aboutsummaryrefslogtreecommitdiffstats
path: root/cps-application/src/test/groovy/org/onap
diff options
context:
space:
mode:
authoregernug <gerard.nugent@est.tech>2023-06-15 11:44:50 +0100
committeregernug <gerard.nugent@est.tech>2023-06-15 12:39:17 +0100
commit11004c96ba72f709d54196ed9ce34b58d2cdcf84 (patch)
tree8966ecae880a470ad673211f928e0fabe5019e29 /cps-application/src/test/groovy/org/onap
parent9474e8f257f9a03c80c01cbf3729cd128a43847b (diff)
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 <gerard.nugent@est.tech> Change-Id: I100884f10beaac6ce87e603302280aeb78559017
Diffstat (limited to 'cps-application/src/test/groovy/org/onap')
-rwxr-xr-xcps-application/src/test/groovy/org/onap/cps/rest/controller/ControllerSecuritySpec.groovy4
1 files changed, 4 insertions, 0 deletions
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 5c255f1da..ccadc5724 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