From 44ed2a90cb4eeb0b96b90ae132c52f51d858fced Mon Sep 17 00:00:00 2001 From: Fiete Ostkamp Date: Wed, 12 Jun 2024 11:52:34 +0200 Subject: [PATCH] Sparky deployment not working after change to schema ingestion - hide the oxm-reader-bean.xml behind a profile [1] [1] it was added in the previous CR and has some unintended side-effects. It is only used for running the tests Issue-ID: AAI-3866 Change-Id: I2af8ef47526b2aaebe9355126f88f39a72e4ed3c Signed-off-by: Fiete Ostkamp --- sparkybe-onap-application/config/spring-beans/oxm-reader-bean.xml | 6 +++--- .../aai/sparky/aggregatevnf/AggregateSummaryProcessorTest.java | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sparkybe-onap-application/config/spring-beans/oxm-reader-bean.xml b/sparkybe-onap-application/config/spring-beans/oxm-reader-bean.xml index 74a291c..799e2f5 100644 --- a/sparkybe-onap-application/config/spring-beans/oxm-reader-bean.xml +++ b/sparkybe-onap-application/config/spring-beans/oxm-reader-bean.xml @@ -1,5 +1,5 @@ - - @@ -59,4 +59,4 @@ - \ No newline at end of file + diff --git a/sparkybe-onap-application/src/test/java/org/onap/aai/sparky/aggregatevnf/AggregateSummaryProcessorTest.java b/sparkybe-onap-application/src/test/java/org/onap/aai/sparky/aggregatevnf/AggregateSummaryProcessorTest.java index f6a88aa..7c325b3 100644 --- a/sparkybe-onap-application/src/test/java/org/onap/aai/sparky/aggregatevnf/AggregateSummaryProcessorTest.java +++ b/sparkybe-onap-application/src/test/java/org/onap/aai/sparky/aggregatevnf/AggregateSummaryProcessorTest.java @@ -56,7 +56,7 @@ import org.springframework.web.client.RestClientException; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -@ActiveProfiles({"oxm-default","oxm-schema-dev", "camel","fe-dev"}) +@ActiveProfiles({"test","oxm-default","oxm-schema-dev", "camel","fe-dev"}) @RunWith(SpringRunner.class) @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) public class AggregateSummaryProcessorTest { @@ -65,7 +65,7 @@ public class AggregateSummaryProcessorTest { @MockBean SearchServiceAdapter searchServiceAdapter; @Mock OperationResult operationResult; - + @Autowired private TestRestTemplate restTemplate; @@ -83,13 +83,13 @@ public class AggregateSummaryProcessorTest { Map params = new HashMap(); AggregationFilter filter = new AggregationFilter("1","someOrchestrationStatus"); FilterAggregationRequest request = new FilterAggregationRequest(Arrays.asList(filter)); - + ResponseEntity response = restTemplate.postForEntity("/rest/search/filterAggregation", objectMapper.writeValueAsString(request), AggregationsResponse.class); AggregationsResponse aggregationsResponse = response.getBody(); assertEquals(1L, aggregationsResponse.getTotal()); BucketResponse bucket = aggregationsResponse.getAggregations().get("someAggregation").get(0); assertEquals("someKey", bucket.getKey()); assertEquals(0, bucket.getDocCount()); - + } } -- 2.16.6