Bugfix, RIC configs would disappear after one minute
[nonrtric.git] / policy-agent / src / test / java / org / oransc / policyagent / ApplicationTest.java
index f701ee5..4f0dbb8 100644 (file)
@@ -554,9 +554,10 @@ public class ApplicationTest {
         // Keep alive, no registerred service
         testErrorCode(restClient().post("/services/keepalive?name=name", ""), HttpStatus.NOT_FOUND);
 
-        // PUT servive with crap payload
+        // PUT servive with bad payload
         testErrorCode(restClient().put("/service", "crap"), HttpStatus.BAD_REQUEST);
         testErrorCode(restClient().put("/service", "{}"), HttpStatus.BAD_REQUEST);
+        testErrorCode(restClient().put("/service", createServiceJson("name", -123)), HttpStatus.BAD_REQUEST);
 
         // GET non existing servive
         testErrorCode(restClient().get("/services?name=XXX"), HttpStatus.NOT_FOUND);
@@ -714,6 +715,7 @@ public class ApplicationTest {
             .name(ricName) //
             .baseUrl(ricName) //
             .managedElementIds(mes) //
+            .controllerName("") //
             .build();
         Ric ric = new Ric(conf);
         ric.setState(Ric.RicState.IDLE);