X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=enrichment-coordinator-service%2Fsrc%2Ftest%2Fjava%2Forg%2Foransc%2Fenrichment%2FApplicationTest.java;h=9d55940ea3e42e8a786c0bd768c4c1076417e621;hb=2a88005a4b62628df36c8c187b435c2dda89828e;hp=45961416c733fdaf253403f793ab58c222cba607;hpb=edea18a8fda2e2201cb3ede7f7af13f610bf4acc;p=nonrtric.git diff --git a/enrichment-coordinator-service/src/test/java/org/oransc/enrichment/ApplicationTest.java b/enrichment-coordinator-service/src/test/java/org/oransc/enrichment/ApplicationTest.java index 45961416..9d55940e 100644 --- a/enrichment-coordinator-service/src/test/java/org/oransc/enrichment/ApplicationTest.java +++ b/enrichment-coordinator-service/src/test/java/org/oransc/enrichment/ApplicationTest.java @@ -449,6 +449,21 @@ class ApplicationTest { verifyJobStatus(EI_JOB_ID, "ENABLED"); } + @Test + void consumerPutInformationJob_noType() throws JsonMappingException, JsonProcessingException, ServiceException { + String url = ConsumerConsts.API_ROOT + "/info-jobs/jobId?typeCheck=false"; + String body = gson.toJson(consumerJobInfo()); + ResponseEntity resp = restClient().putForEntity(url, body).block(); + assertThat(this.eiJobs.size()).isEqualTo(1); + assertThat(resp.getStatusCode()).isEqualTo(HttpStatus.CREATED); + verifyJobStatus(EI_JOB_ID, "DISABLED"); + + putEiProducerWithOneType(PRODUCER_ID, TYPE_ID); + + verifyJobStatus(EI_JOB_ID, "ENABLED"); + + } + @Test void a1ePutEiJob_jsonSchemavalidationError() throws Exception { putEiProducerWithOneType(PRODUCER_ID, TYPE_ID); @@ -466,7 +481,7 @@ class ApplicationTest { void consumerPutJob_jsonSchemavalidationError() throws Exception { putEiProducerWithOneType(PRODUCER_ID, TYPE_ID); - String url = ConsumerConsts.API_ROOT + "/info-jobs/jobId"; + String url = ConsumerConsts.API_ROOT + "/info-jobs/jobId?typeCheck=true"; // The element with name "property1" is mandatory in the schema ConsumerJobInfo jobInfo = new ConsumerJobInfo("typeId", jsonObject("{ \"XXstring\" : \"value\" }"), "owner", "targetUri", "jobStatusUrl");