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;
Duration checkInterval = Duration.ofMillis(1);
return new ServiceSupervision(this.services, this.policies, this.getA1ClientFactory(), checkInterval);
}
+
+ @Bean
+ public ServletWebServerFactory servletContainer() {
+ return new TomcatServletWebServerFactory();
+ }
+
}
@LocalServerPort
String rsp = restClient().get(url).block();
assertThat(rsp.contains(policyInstanceId)).isTrue();
+ url = "/policy?id=" + policyInstanceId;
+ rsp = restClient().get(url).block();
+ assertThat(rsp).isEqualTo(policyBody);
+
// Test of error codes
url = putPolicyUrl(serviceName, ricName + "XX", policyTypeName, policyInstanceId);
testErrorCode(restClient().put(url, policyBody), HttpStatus.NOT_FOUND);
}
private String jsonString() {
- return "{\n \"servingCellNrcgi\": \"1\"\n }";
+ return "{\"servingCellNrcgi\":\"1\"}";
}
@Test