summaryrefslogtreecommitdiff
path: root/src/integrationTest/kotlin/dev/dnpm
diff options
context:
space:
mode:
Diffstat (limited to 'src/integrationTest/kotlin/dev/dnpm')
-rw-r--r--src/integrationTest/kotlin/dev/dnpm/etl/processor/web/ConfigControllerTest.kt15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/integrationTest/kotlin/dev/dnpm/etl/processor/web/ConfigControllerTest.kt b/src/integrationTest/kotlin/dev/dnpm/etl/processor/web/ConfigControllerTest.kt
index 4ac9db2..af4650d 100644
--- a/src/integrationTest/kotlin/dev/dnpm/etl/processor/web/ConfigControllerTest.kt
+++ b/src/integrationTest/kotlin/dev/dnpm/etl/processor/web/ConfigControllerTest.kt
@@ -89,7 +89,6 @@ abstract class MockSink : Sinks.Many<Boolean>
TransformationService::class,
GPasConnectionCheckService::class,
RestConnectionCheckService::class,
- UserRoleService::class
)
class ConfigControllerTest {
@@ -97,20 +96,17 @@ class ConfigControllerTest {
private lateinit var webClient: WebClient
private lateinit var requestProcessor: RequestProcessor
- private lateinit var userRoleService: UserRoleService
private lateinit var connectionCheckUpdateProducer: Sinks.Many<ConnectionCheckResult>
@BeforeEach
fun setup(
@Autowired mockMvc: MockMvc,
@Autowired requestProcessor: RequestProcessor,
- @Autowired userRoleService: UserRoleService,
@Autowired connectionCheckUpdateProducer: Sinks.Many<ConnectionCheckResult>
) {
this.mockMvc = mockMvc
this.webClient = MockMvcWebClientBuilder.mockMvcSetup(mockMvc).build()
this.requestProcessor = requestProcessor
- this.userRoleService = userRoleService
this.connectionCheckUpdateProducer = connectionCheckUpdateProducer
webClient.options.isThrowExceptionOnScriptError = false
@@ -256,10 +252,19 @@ class ConfigControllerTest {
"app.security.admin-password={noop}very-secret"
]
)
+ @MockBean(
+ UserRoleService::class
+ )
inner class WithUserRolesEnabled {
+ private lateinit var userRoleService: UserRoleService
+
@BeforeEach
- fun setup() {
+ fun setup(
+ @Autowired userRoleService: UserRoleService
+ ) {
webClient.options.isThrowExceptionOnScriptError = false
+
+ this.userRoleService = userRoleService
}
@Test