X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=policy-agent%2Fsrc%2Ftest%2Fjava%2Forg%2Foransc%2Fpolicyagent%2FApplicationTest.java;h=4a7adf503974f4b603e40877937d6543b8772309;hb=4daef5fbc1689ca8e129858e8e439077f6f1d120;hp=1784fea7d107761237c683bf28bfd9a1d5205c87;hpb=f85d5640c9e3ebec82f6de62d0f1c9d70efe8945;p=nonrtric.git diff --git a/policy-agent/src/test/java/org/oransc/policyagent/ApplicationTest.java b/policy-agent/src/test/java/org/oransc/policyagent/ApplicationTest.java index 1784fea7..4a7adf50 100644 --- a/policy-agent/src/test/java/org/oransc/policyagent/ApplicationTest.java +++ b/policy-agent/src/test/java/org/oransc/policyagent/ApplicationTest.java @@ -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);