aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsdc-os-chef/scripts/docker_run.sh2
-rw-r--r--test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/api/ComponentBaseTest.java6
-rw-r--r--test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/sanity/Onboard.java7
-rw-r--r--test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/AssetRestUtils.java4
-rw-r--r--test-apis-ci/src/main/java/org/openecomp/sdc/externalApis/GetCSARofVF.java12
5 files changed, 13 insertions, 18 deletions
diff --git a/sdc-os-chef/scripts/docker_run.sh b/sdc-os-chef/scripts/docker_run.sh
index 23dcc55b0f..08be852676 100755
--- a/sdc-os-chef/scripts/docker_run.sh
+++ b/sdc-os-chef/scripts/docker_run.sh
@@ -206,7 +206,7 @@ echo -e ""
#fi
# sanityDocker
-echo "docker run sdc-frontend..."
+echo "docker run sdc-sanity..."
if [ ${SKIPTESTS} = false ]; then
echo "Triger sanity docker, please wait..."
if [ ${LOCAL} = false ]; then
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/api/ComponentBaseTest.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/api/ComponentBaseTest.java
index 01fad09d0d..92645fa6f3 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/api/ComponentBaseTest.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/api/ComponentBaseTest.java
@@ -188,9 +188,9 @@ public abstract class ComponentBaseTest {
performClean();
shutdownTitanLogic();
- String basePath = FileHandling.getBasePath();
- String csarDir = FileHandling.getCreateDirByName("outputCsar");
- FileUtils.cleanDirectory(new File(csarDir));
+// String basePath = FileHandling.getBasePath();
+// String csarDir = FileHandling.getCreateDirByName("outputCsar");
+// FileUtils.cleanDirectory(new File(csarDir));
}
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/sanity/Onboard.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/sanity/Onboard.java
index 4db35a2ce5..2477b42ee2 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/sanity/Onboard.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/sanity/Onboard.java
@@ -24,7 +24,6 @@ package org.openecomp.sdc.ci.tests.sanity;
-import org.apache.http.HttpResponse;
import org.junit.Rule;
import org.junit.rules.TestName;
import org.openecomp.sdc.be.datatypes.enums.AssetTypeEnum;
@@ -47,7 +46,6 @@ import org.openecomp.sdc.ci.tests.utils.general.ElementFactory;
import org.openecomp.sdc.ci.tests.utils.general.OnboardingUtillViaApis;
import org.openecomp.sdc.ci.tests.utils.rest.AssetRestUtils;
import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper;
-import org.openecomp.sdc.tosca.parser.exceptions.SdcToscaParserException;
import org.openecomp.sdc.tosca.parser.impl.SdcToscaParserFactory;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Optional;
@@ -60,9 +58,6 @@ import com.clearspring.analytics.util.Pair;
import fj.data.Either;
import java.io.File;
-import java.io.InputStream;
-import java.util.List;
-import java.util.Map;
public class Onboard extends ComponentBaseTest {
@@ -131,7 +126,7 @@ public class Onboard extends ComponentBaseTest {
try{
// HttpResponse assetResponse = AssetRestUtils.getComponentToscaModel(AssetTypeEnum.SERVICES, service.getUUID());
// InputStream inputStream = assetResponse.getEntity().getContent();
- File csarFile = AssetRestUtils.getToscaModelCsarFile(AssetTypeEnum.SERVICES, service.getUUID());
+ File csarFile = AssetRestUtils.getToscaModelCsarFile(AssetTypeEnum.SERVICES, service.getUUID(), "");
ExtentTestActions.log(Status.INFO, "Tosca parser is going to convert service csar file to ISdcCsarHelper object...");
fdntCsarHelper = factory.getSdcCsarHelper(csarFile.getAbsolutePath());
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/AssetRestUtils.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/AssetRestUtils.java
index 7bcf33801a..71918386d9 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/AssetRestUtils.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/AssetRestUtils.java
@@ -97,7 +97,7 @@ public class AssetRestUtils extends BaseRestUtils {
return httpclient.execute(httpGet);
}
- public static File getToscaModelCsarFile(AssetTypeEnum assetType, String uuid) throws IOException {
+ public static File getToscaModelCsarFile(AssetTypeEnum assetType, String uuid, String fileName) throws IOException {
Config config = Utils.getConfig();
CloseableHttpClient httpclient = HttpClients.createDefault();
String url = String.format(Urls.GET_TOSCA_MODEL, config.getCatalogBeHost(), config.getCatalogBePort(),
@@ -105,7 +105,7 @@ public class AssetRestUtils extends BaseRestUtils {
HttpGet httpGet = new HttpGet(url);
String csarDir = FileHandling.getCreateDirByName("outputCsar");
- File myFile = new File(csarDir+ File.separator + "tmpCSAR" + getShortUUID()+".csar");
+ File myFile = new File(csarDir+ File.separator + "tmpCSAR_" + fileName + ".csar");
httpGet.addHeader(HttpHeaderEnum.X_ECOMP_INSTANCE_ID.getValue(), "ci");
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/externalApis/GetCSARofVF.java b/test-apis-ci/src/main/java/org/openecomp/sdc/externalApis/GetCSARofVF.java
index 9d56316b18..7ab35b758e 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/externalApis/GetCSARofVF.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/externalApis/GetCSARofVF.java
@@ -86,7 +86,7 @@ public class GetCSARofVF extends ComponentBaseTest {
Resource resource = AtomicOperationUtils.createResourceByType(ResourceTypeEnum.VF, UserRoleEnum.DESIGNER, true).left().value();
// HttpResponse componentToscaModel = AssetRestUtils.getComponentToscaModel(AssetTypeEnum.RESOURCES, resource.getUUID());
- File toscaModelCsarFile = AssetRestUtils.getToscaModelCsarFile(AssetTypeEnum.RESOURCES, resource.getUUID());
+ File toscaModelCsarFile = AssetRestUtils.getToscaModelCsarFile(AssetTypeEnum.RESOURCES, resource.getUUID(), "");
// validate tosca structure
validateCsarContent(resource, toscaModelCsarFile);
@@ -108,7 +108,7 @@ public class GetCSARofVF extends ComponentBaseTest {
AtomicOperationUtils.changeComponentState(resource, UserRoleEnum.DESIGNER, LifeCycleStatesEnum.CHECKIN, true);
// HttpResponse componentToscaModel = AssetRestUtils.getComponentToscaModel(AssetTypeEnum.RESOURCES, resource.getUUID());
- File toscaModelCsarFile = AssetRestUtils.getToscaModelCsarFile(AssetTypeEnum.RESOURCES, resource.getUUID());
+ File toscaModelCsarFile = AssetRestUtils.getToscaModelCsarFile(AssetTypeEnum.RESOURCES, resource.getUUID(), "");
// validate tosca structure
validateCsarContent(resource, toscaModelCsarFile);
@@ -128,7 +128,7 @@ public class GetCSARofVF extends ComponentBaseTest {
AtomicOperationUtils.changeComponentState(resource, UserRoleEnum.DESIGNER, LifeCycleStatesEnum.CERTIFY, true);
// HttpResponse componentToscaModel = AssetRestUtils.getComponentToscaModel(AssetTypeEnum.RESOURCES, resource.getUUID());
- File toscaModelCsarFile = AssetRestUtils.getToscaModelCsarFile(AssetTypeEnum.RESOURCES, resource.getUUID());
+ File toscaModelCsarFile = AssetRestUtils.getToscaModelCsarFile(AssetTypeEnum.RESOURCES, resource.getUUID(), "");
// validate tosca structure
validateCsarContent(resource, toscaModelCsarFile);
@@ -146,7 +146,7 @@ public class GetCSARofVF extends ComponentBaseTest {
Service service = AtomicOperationUtils.createDefaultService(UserRoleEnum.DESIGNER, true).left().value();
// HttpResponse componentToscaModel = AssetRestUtils.getComponentToscaModel(AssetTypeEnum.RESOURCES, resource.getUUID());
- File toscaModelCsarFile = AssetRestUtils.getToscaModelCsarFile(AssetTypeEnum.SERVICES, service.getUUID());
+ File toscaModelCsarFile = AssetRestUtils.getToscaModelCsarFile(AssetTypeEnum.SERVICES, service.getUUID(), "");
// validate tosca structure
validateCsarContent(service, toscaModelCsarFile);
@@ -165,7 +165,7 @@ public class GetCSARofVF extends ComponentBaseTest {
AtomicOperationUtils.changeComponentState(service, UserRoleEnum.DESIGNER, LifeCycleStatesEnum.CHECKIN, true);
// HttpResponse componentToscaModel = AssetRestUtils.getComponentToscaModel(AssetTypeEnum.RESOURCES, resource.getUUID());
- File toscaModelCsarFile = AssetRestUtils.getToscaModelCsarFile(AssetTypeEnum.SERVICES, service.getUUID());
+ File toscaModelCsarFile = AssetRestUtils.getToscaModelCsarFile(AssetTypeEnum.SERVICES, service.getUUID(), "");
// validate tosca structure
validateCsarContent(service, toscaModelCsarFile);
@@ -183,7 +183,7 @@ public class GetCSARofVF extends ComponentBaseTest {
AtomicOperationUtils.changeComponentState(service, UserRoleEnum.DESIGNER, LifeCycleStatesEnum.CERTIFY, true);
// HttpResponse componentToscaModel = AssetRestUtils.getComponentToscaModel(AssetTypeEnum.RESOURCES, resource.getUUID());
- File toscaModelCsarFile = AssetRestUtils.getToscaModelCsarFile(AssetTypeEnum.SERVICES, service.getUUID());
+ File toscaModelCsarFile = AssetRestUtils.getToscaModelCsarFile(AssetTypeEnum.SERVICES, service.getUUID(), "");
// validate tosca structure
validateCsarContent(service, toscaModelCsarFile);