diff options
author | Dan Timoney <dtimoney@att.com> | 2022-01-24 15:10:59 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2022-01-24 15:10:59 +0000 |
commit | 3d2a09b1bc7d6798c8083bfc3dc04c69a1b709c7 (patch) | |
tree | 9e7050f6c6249783798e09b07e729c9f0ac28975 /a1-policy-management | |
parent | d8799f7d82210e042f34ff45cad155a75736c26f (diff) | |
parent | 6805d7a567e50d1257d41e874f6bc090b6080170 (diff) |
Merge "Fixed a unittest so it does not open an http port"
Diffstat (limited to 'a1-policy-management')
-rw-r--r-- | a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ConfigurationControllerTest.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ConfigurationControllerTest.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ConfigurationControllerTest.java index b4ff6962..d1c36e62 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ConfigurationControllerTest.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ConfigurationControllerTest.java @@ -43,7 +43,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.boot.test.context.TestConfiguration; +import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.web.servlet.server.ServletWebServerFactory; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.http.HttpStatus; @@ -101,6 +103,11 @@ class ConfigurationControllerTest { public ApplicationConfig getApplicationConfig() { return new MockApplicationConfig(); } + + @Bean + public ServletWebServerFactory servletContainer() { + return new TomcatServletWebServerFactory(); + } } @LocalServerPort |