From 11004c96ba72f709d54196ed9ce34b58d2cdcf84 Mon Sep 17 00:00:00 2001 From: egernug Date: Thu, 15 Jun 2023 11:44:50 +0100 Subject: Replace deprecated WebSecurityConfigurerAdapter WebSecurityConfigurerAdapter has been deprecated in Spring 2.7. Change needed to use SecurityFilterChain and InMemoryUserDetailsManager. Note: WebMvcTest does not autoimport configurations that use beans. Issue-Id: CPS-1742 Signed-off-by: egernug Change-Id: I100884f10beaac6ce87e603302280aeb78559017 --- .../groovy/org/onap/cps/rest/controller/ControllerSecuritySpec.groovy | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cps-application/src/test/groovy') diff --git a/cps-application/src/test/groovy/org/onap/cps/rest/controller/ControllerSecuritySpec.groovy b/cps-application/src/test/groovy/org/onap/cps/rest/controller/ControllerSecuritySpec.groovy index 5c255f1dac..ccadc57240 100755 --- a/cps-application/src/test/groovy/org/onap/cps/rest/controller/ControllerSecuritySpec.groovy +++ b/cps-application/src/test/groovy/org/onap/cps/rest/controller/ControllerSecuritySpec.groovy @@ -20,6 +20,9 @@ package org.onap.cps.rest.controller +import org.onap.cps.config.WebSecurityConfig +import org.springframework.context.annotation.Import + import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get import org.springframework.beans.factory.annotation.Autowired @@ -29,6 +32,7 @@ import org.springframework.test.web.servlet.MockMvc import spock.lang.Specification @WebMvcTest(TestController) +@Import(WebSecurityConfig) class ControllerSecuritySpec extends Specification { @Autowired -- cgit 1.2.3-korg