aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServlet.java16
-rwxr-xr-xsdc-os-chef/scripts/docker_run.sh8
-rw-r--r--sdc-os-chef/sdc-backend/startup.sh4
-rw-r--r--sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/sanityTests_3_sanity_execution.rb2
-rw-r--r--sdc-os-chef/sdc-sanity/startup.sh2
-rw-r--r--test-apis-ci/src/main/resources/ci/testSuites/onap.xml2
6 files changed, 24 insertions, 10 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServlet.java
index 6e971f215d..b9956063d6 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServlet.java
@@ -243,8 +243,13 @@ public class AssetsDataServlet extends AbstractValidationsServlet {
ComponentTypeEnum componentType = ComponentTypeEnum.findByParamName(assetType);
additionalParam.put(AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_CONSUMER_ID, instanceIdHeader);
additionalParam.put(AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_RESOURCE_URL, requestURI);
- additionalParam.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_TYPE, componentType.getValue());
additionalParam.put(AuditingFieldsKeysEnum.AUDIT_SERVICE_INSTANCE_ID, uuid);
+ if (componentType == null) {
+ log.debug("getMetaData: assetType parameter {} is not valid", assetType);
+ responseFormat = getComponentsUtils().getResponseFormat(ActionStatus.INVALID_CONTENT);
+ return buildErrorResponse(responseFormat);
+ }
+ additionalParam.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_TYPE, componentType.getValue());
// Mandatory
if (instanceIdHeader == null || instanceIdHeader.isEmpty()) {
@@ -331,8 +336,15 @@ public class AssetsDataServlet extends AbstractValidationsServlet {
EnumMap<AuditingFieldsKeysEnum, Object> additionalParam = new EnumMap<AuditingFieldsKeysEnum, Object>(AuditingFieldsKeysEnum.class);
additionalParam.put(AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_CONSUMER_ID, instanceIdHeader);
additionalParam.put(AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_RESOURCE_URL, url);
- additionalParam.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_TYPE, componentType.getValue());
additionalParam.put(AuditingFieldsKeysEnum.AUDIT_SERVICE_INSTANCE_ID, uuid);
+
+ if (componentType == null) {
+ log.debug("getToscaModel: assetType parameter {} is not valid", assetType);
+ responseFormat = getComponentsUtils().getResponseFormat(ActionStatus.INVALID_CONTENT);
+ return buildErrorResponse(responseFormat);
+ }
+ additionalParam.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_TYPE, componentType.getValue());
+
if (instanceIdHeader == null || instanceIdHeader.isEmpty()) {
log.debug("getToscaModel: Missing X-ECOMP-InstanceID header");
diff --git a/sdc-os-chef/scripts/docker_run.sh b/sdc-os-chef/scripts/docker_run.sh
index 3b68bb9afb..963b2fcf14 100755
--- a/sdc-os-chef/scripts/docker_run.sh
+++ b/sdc-os-chef/scripts/docker_run.sh
@@ -17,16 +17,16 @@ function cleanup {
function dir_perms {
- mkdir -p /data/logs/BE/ASDC/ASDC-BE
- mkdir -p /data/logs/FE/ASDC/ASDC-FE
+ mkdir -p /data/logs/BE/SDC/SDC-BE
+ mkdir -p /data/logs/FE/SDC/SDC-FE
chmod -R 777 /data/logs
}
function monitor_docker {
echo monitor $1 Docker
-
-TIME_OUT=180
+sleep 5
+TIME_OUT=600
INTERVAL=20
TIME=0
while [ "$TIME" -lt "$TIME_OUT" ]; do
diff --git a/sdc-os-chef/sdc-backend/startup.sh b/sdc-os-chef/sdc-backend/startup.sh
index 87f4ae674d..8e5926cdc4 100644
--- a/sdc-os-chef/sdc-backend/startup.sh
+++ b/sdc-os-chef/sdc-backend/startup.sh
@@ -37,7 +37,9 @@ else
chef-solo -c normatives.rb
fi
+echo "###### DOCKER STARTED #####"
+
while true; do sleep 2; done
-echo "###### DOCKER STARTED #####"
+
diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/sanityTests_3_sanity_execution.rb b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/sanityTests_3_sanity_execution.rb
index 690559a74d..c4323c233f 100644
--- a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/sanityTests_3_sanity_execution.rb
+++ b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/sanityTests_3_sanity_execution.rb
@@ -6,7 +6,7 @@ cwd "#{tests_base}"
code <<-EOH
cd "#{tests_base}"
jar_file=`ls test-apis*-jar-with-dependencies.jar`
- nohup ./startTest.sh $jar_file #{ci_test_suite} &
+ ./startTest.sh $jar_file #{ci_test_suite} > #{tests_base}/target/startTest.out 2>&1
echo "return code from startTest.sh = [$?]"
EOH
timeout 72000
diff --git a/sdc-os-chef/sdc-sanity/startup.sh b/sdc-os-chef/sdc-sanity/startup.sh
index d4316c383f..e4edfc67e6 100644
--- a/sdc-os-chef/sdc-sanity/startup.sh
+++ b/sdc-os-chef/sdc-sanity/startup.sh
@@ -14,7 +14,7 @@ rc=$?
# exit 0
#fi
-while true; do sleep 2; done
+#while true; do sleep 2; done
##/docker-entrypoint.sh
diff --git a/test-apis-ci/src/main/resources/ci/testSuites/onap.xml b/test-apis-ci/src/main/resources/ci/testSuites/onap.xml
index c075f10b11..1d5bc4b1bf 100644
--- a/test-apis-ci/src/main/resources/ci/testSuites/onap.xml
+++ b/test-apis-ci/src/main/resources/ci/testSuites/onap.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
-<suite name="externalApis" configfailurepolicy="continue" verbose="2" parallel="methods" thread-count="2" data-provider-thread-count="2">
+<suite name="externalApis" configfailurepolicy="continue" verbose="2" parallel="methods" thread-count="1" data-provider-thread-count="1">
<test name="ExternalApis">
<classes>