diff options
Diffstat (limited to 'packages/arquillian-unit-tests')
10 files changed, 108 insertions, 50 deletions
diff --git a/packages/arquillian-unit-tests/pom.xml b/packages/arquillian-unit-tests/pom.xml index 8420cf457d..2b97090ba9 100644 --- a/packages/arquillian-unit-tests/pom.xml +++ b/packages/arquillian-unit-tests/pom.xml @@ -205,23 +205,9 @@ </dependency> <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-core</artifactId> - <scope>test</scope> - <version>2.8.7</version> - </dependency> - - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-all</artifactId> - <version>1.10.19</version> - <scope>test</scope> - </dependency> - - <dependency> <groupId>org.openecomp.sdc.sdc-distribution-client</groupId> <artifactId>sdc-distribution-client</artifactId> - <version>1.1.32</version> + <version>1.2.2</version> <scope>test</scope> </dependency> @@ -386,6 +372,40 @@ </configuration> </plugin> </plugins> + <pluginManagement> + <plugins> + <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.--> + <!-- Added to ensure that eclipse doesn't complain about executing gmaven during the generate-resources phase of the build. --> + <plugin> + <groupId>org.eclipse.m2e</groupId> + <artifactId>lifecycle-mapping</artifactId> + <version>1.0.0</version> + <configuration> + <lifecycleMappingMetadata> + <pluginExecutions> + <pluginExecution> + <pluginExecutionFilter> + <groupId> + org.codehaus.groovy.maven + </groupId> + <artifactId> + gmaven-plugin + </artifactId> + <versionRange>[1.0,)</versionRange> + <goals> + <goal>execute</goal> + </goals> + </pluginExecutionFilter> + <action> + <ignore></ignore> + </action> + </pluginExecution> + </pluginExecutions> + </lifecycleMappingMetadata> + </configuration> + </plugin> + </plugins> + </pluginManagement> </build> </project> diff --git a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/DistributionClientEmulator.java b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/DistributionClientEmulator.java index 3cb5a97d09..4bed3bbd4d 100644 --- a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/DistributionClientEmulator.java +++ b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/DistributionClientEmulator.java @@ -28,14 +28,14 @@ import java.util.LinkedList; import java.util.List; import org.apache.commons.io.IOUtils; -import org.codehaus.jackson.JsonParseException; -import org.codehaus.jackson.map.JsonMappingException; -import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.type.TypeReference; +import org.openecomp.mso.asdc.installer.IVfModuleData; import org.openecomp.sdc.api.IDistributionClient; +import org.openecomp.sdc.api.consumer.IComponentDoneStatusMessage; import org.openecomp.sdc.api.consumer.IConfiguration; import org.openecomp.sdc.api.consumer.IDistributionStatusMessage; +import org.openecomp.sdc.api.consumer.IFinalDistrStatusMessage; import org.openecomp.sdc.api.consumer.INotificationCallback; +import org.openecomp.sdc.api.consumer.IStatusCallback; import org.openecomp.sdc.api.notification.IArtifactInfo; import org.openecomp.sdc.api.notification.IVfModuleMetadata; import org.openecomp.sdc.api.results.IDistributionClientDownloadResult; @@ -44,8 +44,6 @@ import org.openecomp.sdc.impl.DistributionClientDownloadResultImpl; import org.openecomp.sdc.impl.DistributionClientResultImpl; import org.openecomp.sdc.utils.DistributionActionResultEnum; -import org.openecomp.mso.asdc.installer.IVfModuleData; - public class DistributionClientEmulator implements IDistributionClient { private String resourcePath; @@ -132,6 +130,11 @@ public class DistributionClientEmulator implements IDistributionClient { } @Override + public IDistributionClientResult init(IConfiguration arg0, INotificationCallback arg1, IStatusCallback arg2) { + return new DistributionClientResultImpl(DistributionActionResultEnum.SUCCESS,DistributionActionResultEnum.SUCCESS.name()); + } + + @Override public IDistributionClientResult sendDeploymentStatus(IDistributionStatusMessage arg0) { this.distributionMessageReceived.add(arg0); return new DistributionClientResultImpl(DistributionActionResultEnum.SUCCESS,DistributionActionResultEnum.SUCCESS.name()); @@ -171,4 +174,27 @@ public class DistributionClientEmulator implements IDistributionClient { return new DistributionClientResultImpl(DistributionActionResultEnum.SUCCESS,DistributionActionResultEnum.SUCCESS.name()); } + @Override + public IDistributionClientResult sendComponentDoneStatus(IComponentDoneStatusMessage arg0) { + // TODO Auto-generated method stub + return null; + } + + @Override + public IDistributionClientResult sendComponentDoneStatus(IComponentDoneStatusMessage arg0, String arg1) { + // TODO Auto-generated method stub + return null; + } + + @Override + public IDistributionClientResult sendFinalDistrStatus(IFinalDistrStatusMessage arg0) { + // TODO Auto-generated method stub + return null; + } + + @Override + public IDistributionClientResult sendFinalDistrStatus(IFinalDistrStatusMessage arg0, String arg1) { + // TODO Auto-generated method stub + return null; + } } diff --git a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonArtifactInfo.java b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonArtifactInfo.java index 90511033dd..ddf05699e2 100644 --- a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonArtifactInfo.java +++ b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonArtifactInfo.java @@ -24,11 +24,11 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; -import org.codehaus.jackson.annotate.JsonAnySetter; -import org.codehaus.jackson.annotate.JsonIgnore; - import org.openecomp.sdc.api.notification.IArtifactInfo; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; + public class JsonArtifactInfo implements IArtifactInfo { @JsonIgnore diff --git a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonArtifactInfoDeserializer.java b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonArtifactInfoDeserializer.java index 010c9ac2a7..901c1fcdaa 100644 --- a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonArtifactInfoDeserializer.java +++ b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonArtifactInfoDeserializer.java @@ -23,12 +23,14 @@ package org.openecomp.mso.global_tests.asdc.notif_emulator; import java.io.IOException; import java.util.List; -import org.codehaus.jackson.JsonParser; -import org.codehaus.jackson.JsonProcessingException; -import org.codehaus.jackson.map.DeserializationContext; -import org.codehaus.jackson.map.JsonDeserializer; -import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.type.TypeReference; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.ObjectMapper; + + public class JsonArtifactInfoDeserializer extends JsonDeserializer<List<JsonArtifactInfo>>{ diff --git a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonNotificationData.java b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonNotificationData.java index cf041afd6c..c1037624c1 100644 --- a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonNotificationData.java +++ b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonNotificationData.java @@ -26,17 +26,17 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.codehaus.jackson.annotate.JsonAnySetter; -import org.codehaus.jackson.annotate.JsonIgnore; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.map.annotate.JsonDeserialize; import org.jboss.shrinkwrap.api.exporter.FileExistsException; - import org.openecomp.sdc.api.notification.IArtifactInfo; import org.openecomp.sdc.api.notification.INotificationData; import org.openecomp.sdc.api.notification.IResourceInstance; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + public class JsonNotificationData implements INotificationData { @@ -125,4 +125,13 @@ public class JsonNotificationData implements INotificationData { public String getServiceVersion() { return (String)this.attributesMap.get("serviceVersion"); } + + @Override + public String getWorkloadContext() { + return (String)this.attributesMap.get("workloadContext"); + } + + @Override + public void setWorkloadContext(String arg0) { + } } diff --git a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonResourceInfo.java b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonResourceInfo.java index af49ee0d37..eff79963a5 100644 --- a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonResourceInfo.java +++ b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonResourceInfo.java @@ -24,14 +24,14 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.codehaus.jackson.annotate.JsonAnySetter; -import org.codehaus.jackson.annotate.JsonIgnore; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonDeserialize; - import org.openecomp.sdc.api.notification.IArtifactInfo; import org.openecomp.sdc.api.notification.IResourceInstance; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + public class JsonResourceInfo implements IResourceInstance { @JsonIgnore diff --git a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonResourceInfoDeserializer.java b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonResourceInfoDeserializer.java index 5b18a2cbc9..e3db9de197 100644 --- a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonResourceInfoDeserializer.java +++ b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonResourceInfoDeserializer.java @@ -23,12 +23,12 @@ package org.openecomp.mso.global_tests.asdc.notif_emulator; import java.io.IOException; import java.util.List; -import org.codehaus.jackson.JsonParser; -import org.codehaus.jackson.JsonProcessingException; -import org.codehaus.jackson.map.DeserializationContext; -import org.codehaus.jackson.map.JsonDeserializer; -import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.type.TypeReference; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.ObjectMapper; public class JsonResourceInfoDeserializer extends JsonDeserializer<List<JsonResourceInfo>>{ diff --git a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonVfModuleMetaData.java b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonVfModuleMetaData.java index 08d9895a53..1871f09f27 100644 --- a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonVfModuleMetaData.java +++ b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonVfModuleMetaData.java @@ -24,11 +24,12 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.codehaus.jackson.annotate.JsonAnySetter; -import org.codehaus.jackson.annotate.JsonIgnore; -import org.codehaus.jackson.annotate.JsonProperty; import org.openecomp.sdc.api.notification.IVfModuleMetadata; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + public class JsonVfModuleMetaData implements IVfModuleMetadata { @JsonProperty("artifacts") diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg511NfmService.csar b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg511NfmService.csar Binary files differindex a383359ca0..2686e4ba57 100644 --- a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg511NfmService.csar +++ b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg511NfmService.csar diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg516VmmscSrvc_csar.csar b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg516VmmscSrvc_csar.csar Binary files differindex edbd8d8fcc..d2983ce609 100644 --- a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg516VmmscSrvc_csar.csar +++ b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg516VmmscSrvc_csar.csar |