diff options
author | Steve Smokowski <ss835w@att.com> | 2019-04-04 17:31:43 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-04-04 17:31:43 +0000 |
commit | f81920304c7b62637d32473e672a1e51275ce54b (patch) | |
tree | 35332de491929d0b278a4698f530f512ce28d46c /asdc-controller | |
parent | 5f78643c42dd12588a1688f658ca6e134674ea29 (diff) | |
parent | 88c47a23b9428188ff5dd0b46941f8856465376b (diff) |
Merge "PNF WF post instantiation configuration"
Diffstat (limited to 'asdc-controller')
-rw-r--r-- | asdc-controller/src/main/resources/application.yaml | 4 | ||||
-rw-r--r-- | asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java | 29 |
2 files changed, 32 insertions, 1 deletions
diff --git a/asdc-controller/src/main/resources/application.yaml b/asdc-controller/src/main/resources/application.yaml index e95e85a4f1..2d0a2acf94 100644 --- a/asdc-controller/src/main/resources/application.yaml +++ b/asdc-controller/src/main/resources/application.yaml @@ -40,5 +40,7 @@ management: prometheus: enabled: true # Whether exporting of metrics to Prometheus is enabled. step: 1m # Step size (i.e. reporting frequency) to use. - +mso: + config: + defaultpath: /app diff --git a/asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java b/asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java index 301ef14637..51559c2ffe 100644 --- a/asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java +++ b/asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java @@ -23,6 +23,7 @@ import static com.github.tomakehurst.wiremock.client.WireMock.ok; import static com.github.tomakehurst.wiremock.client.WireMock.post; import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.fail; @@ -58,6 +59,8 @@ import org.onap.so.db.catalog.data.repository.ServiceRepository; import org.onap.so.db.catalog.data.repository.ToscaCsarRepository; import org.onap.so.db.catalog.data.repository.VnfCustomizationRepository; import org.onap.so.db.catalog.data.repository.VnfResourceRepository; +import org.onap.so.db.request.beans.WatchdogComponentDistributionStatus; +import org.onap.so.db.request.data.repository.WatchdogComponentDistributionStatusRepository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -107,6 +110,9 @@ public class ASDCControllerITTest extends BaseTest { @Autowired private ServiceRepository serviceRepository; + @Autowired + protected WatchdogComponentDistributionStatusRepository watchdogCDStatusRepository; + private DistributionClientEmulator distributionClient; @Before @@ -263,6 +269,18 @@ public class ASDCControllerITTest extends BaseTest { assertEquals("PNF resource customization entity", 1, pnfCustList.size()); assertEquals(pnfCustomizationKey, pnfCustList.get(0).getModelCustomizationUUID()); + /** + * Check the watchdog for component distribution status + */ + List<WatchdogComponentDistributionStatus> distributionList = watchdogCDStatusRepository + .findByDistributionId(this.distributionId); + assertNotNull(distributionList); + assertEquals(1, distributionList.size()); + WatchdogComponentDistributionStatus distributionStatus = distributionList.get(0); + assertEquals("COMPONENT_DONE_OK", distributionStatus.getComponentDistributionStatus()); + assertEquals("SO", distributionStatus.getComponentName()); + + } catch (Exception e) { logger.info(e.getMessage(), e); fail(e.getMessage()); @@ -411,6 +429,17 @@ public class ASDCControllerITTest extends BaseTest { List<VnfResourceCustomization> vnfCustList = service.getVnfCustomizations(); assertEquals("VNF resource customization entity", 1, vnfCustList.size()); assertEquals(vnfCustomizationKey, vnfCustList.get(0).getModelCustomizationUUID()); + + /** + * Check the watchdog for component distribution status + */ + List<WatchdogComponentDistributionStatus> distributionList = watchdogCDStatusRepository + .findByDistributionId(this.distributionId); + assertNotNull(distributionList); + assertEquals(1, distributionList.size()); + WatchdogComponentDistributionStatus distributionStatus = distributionList.get(0); + assertEquals("COMPONENT_DONE_OK", distributionStatus.getComponentDistributionStatus()); + assertEquals("SO", distributionStatus.getComponentName()); } catch (Exception e) { logger.info(e.getMessage(), e); fail(e.getMessage()); |