cleanup and refactoring of notification
close rabbit and redis connexion on application close Refactoring of Configuration class fix notification id increment Add builder for NotificationPush Add close to notificationPush to remove listener Clean tags of tests purge queue before functional tests
This commit is contained in:
@@ -14,6 +14,7 @@ import io.mockk.mockk
|
||||
import org.amshove.kluent.`should be`
|
||||
import org.joda.time.DateTime
|
||||
import org.junit.jupiter.api.Tag
|
||||
import org.junit.jupiter.api.Tags
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.junit.jupiter.api.TestInstance
|
||||
import org.junit.jupiter.api.parallel.Execution
|
||||
@@ -23,7 +24,7 @@ import fr.dcproject.component.article.ArticleRepository as ArticleRepo
|
||||
|
||||
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
|
||||
@Execution(CONCURRENT)
|
||||
@Tag("security")
|
||||
@Tags(Tag("security"), Tag("unit"))
|
||||
internal class ArticleAccessControlTest {
|
||||
private val tesla = CitizenCart(
|
||||
id = UUID.fromString("e6efc288-4283-4729-a268-6debb18de1a0"),
|
||||
|
||||
@@ -10,6 +10,7 @@ import fr.dcproject.security.AccessDecision.GRANTED
|
||||
import org.amshove.kluent.`should be`
|
||||
import org.joda.time.DateTime
|
||||
import org.junit.jupiter.api.Tag
|
||||
import org.junit.jupiter.api.Tags
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.junit.jupiter.api.TestInstance
|
||||
import org.junit.jupiter.api.parallel.Execution
|
||||
@@ -17,7 +18,7 @@ import org.junit.jupiter.api.parallel.ExecutionMode.CONCURRENT
|
||||
|
||||
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
|
||||
@Execution(CONCURRENT)
|
||||
@Tag("security")
|
||||
@Tags(Tag("security"), Tag("unit"))
|
||||
internal class CitizenAccessControlTest {
|
||||
private val tesla = CitizenBasic(
|
||||
user = User(
|
||||
|
||||
@@ -15,6 +15,7 @@ import fr.dcproject.security.AccessDecision.GRANTED
|
||||
import org.amshove.kluent.`should be`
|
||||
import org.joda.time.DateTime
|
||||
import org.junit.jupiter.api.Tag
|
||||
import org.junit.jupiter.api.Tags
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.junit.jupiter.api.TestInstance
|
||||
import org.junit.jupiter.api.parallel.Execution
|
||||
@@ -23,7 +24,7 @@ import java.util.UUID
|
||||
|
||||
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
|
||||
@Execution(CONCURRENT)
|
||||
@Tag("security")
|
||||
@Tags(Tag("security"), Tag("unit"))
|
||||
internal class CommentAccessControlTest {
|
||||
private val tesla = Citizen(
|
||||
user = User(
|
||||
|
||||
@@ -14,6 +14,7 @@ import fr.dcproject.security.AccessDecision.GRANTED
|
||||
import org.amshove.kluent.`should be`
|
||||
import org.joda.time.DateTime
|
||||
import org.junit.jupiter.api.Tag
|
||||
import org.junit.jupiter.api.Tags
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.junit.jupiter.api.TestInstance
|
||||
import org.junit.jupiter.api.parallel.Execution
|
||||
@@ -22,7 +23,7 @@ import java.util.UUID
|
||||
|
||||
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
|
||||
@Execution(CONCURRENT)
|
||||
@Tag("security")
|
||||
@Tags(Tag("security"), Tag("unit"))
|
||||
internal class FollowAccessControlTest {
|
||||
private val tesla = CitizenBasic(
|
||||
user = User(
|
||||
|
||||
@@ -14,6 +14,7 @@ import fr.dcproject.security.AccessDecision.GRANTED
|
||||
import org.amshove.kluent.`should be`
|
||||
import org.joda.time.DateTime
|
||||
import org.junit.jupiter.api.Tag
|
||||
import org.junit.jupiter.api.Tags
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.junit.jupiter.api.TestInstance
|
||||
import org.junit.jupiter.api.parallel.Execution
|
||||
@@ -22,7 +23,7 @@ import java.util.UUID
|
||||
|
||||
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
|
||||
@Execution(CONCURRENT)
|
||||
@Tag("security")
|
||||
@Tags(Tag("security"), Tag("unit"))
|
||||
internal class OpinionAccessControlTest {
|
||||
private val tesla = CitizenBasic(
|
||||
user = User(
|
||||
|
||||
@@ -12,6 +12,7 @@ import fr.dcproject.security.AccessDecision.GRANTED
|
||||
import org.amshove.kluent.`should be`
|
||||
import org.joda.time.DateTime
|
||||
import org.junit.jupiter.api.Tag
|
||||
import org.junit.jupiter.api.Tags
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.junit.jupiter.api.TestInstance
|
||||
import org.junit.jupiter.api.parallel.Execution
|
||||
@@ -20,7 +21,7 @@ import java.util.UUID
|
||||
|
||||
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
|
||||
@Execution(CONCURRENT)
|
||||
@Tag("security")
|
||||
@Tags(Tag("security"), Tag("unit"))
|
||||
internal class OpinionChoiceAccessControlTest {
|
||||
private val tesla = CitizenBasic(
|
||||
id = UUID.fromString("e6efc288-4283-4729-a268-6debb18de1a0"),
|
||||
|
||||
@@ -14,6 +14,7 @@ import fr.dcproject.security.AccessDecision.GRANTED
|
||||
import org.amshove.kluent.`should be`
|
||||
import org.joda.time.DateTime
|
||||
import org.junit.jupiter.api.Tag
|
||||
import org.junit.jupiter.api.Tags
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.junit.jupiter.api.TestInstance
|
||||
import org.junit.jupiter.api.parallel.Execution
|
||||
@@ -23,7 +24,7 @@ import fr.dcproject.component.vote.entity.Vote as VoteEntity
|
||||
|
||||
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
|
||||
@Execution(CONCURRENT)
|
||||
@Tag("security")
|
||||
@Tags(Tag("security"), Tag("unit"))
|
||||
internal class VoteAccessControlTest {
|
||||
private val tesla = Citizen(
|
||||
id = UUID.fromString("a1e35c99-9d33-4fb4-9201-58d7071243bb"),
|
||||
|
||||
@@ -12,6 +12,7 @@ import fr.dcproject.security.AccessDecision.GRANTED
|
||||
import org.amshove.kluent.`should be`
|
||||
import org.joda.time.DateTime
|
||||
import org.junit.jupiter.api.Tag
|
||||
import org.junit.jupiter.api.Tags
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.junit.jupiter.api.TestInstance
|
||||
import org.junit.jupiter.api.parallel.Execution
|
||||
@@ -21,7 +22,7 @@ import fr.dcproject.component.workgroup.Workgroup as WorkgroupEntity
|
||||
|
||||
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
|
||||
@Execution(CONCURRENT)
|
||||
@Tag("security")
|
||||
@Tags(Tag("security"), Tag("unit"))
|
||||
internal class WorkgroupAccessControlTest {
|
||||
private val tesla = CitizenBasic(
|
||||
user = User(
|
||||
|
||||
Reference in New Issue
Block a user