diff options
author | Tal Gitelman <tg851x@intl.att.com> | 2017-12-10 18:55:03 +0200 |
---|---|---|
committer | Tal Gitelman <tg851x@intl.att.com> | 2017-12-10 19:33:38 +0200 |
commit | 51d50f0ef642e0f996a1c8b8d2ef4838bdfec892 (patch) | |
tree | 3ac236a864d74d19b0f5c9020891a7a7e5c31b44 /asdc-tests | |
parent | b5cc2e0695f195716d6ccdc65e73807a6632ec70 (diff) |
Final commit to master merge from
Change-Id: Ib464f9a8828437c86fe6def8af238aaf83473507
Issue-ID: SDC-714
Signed-off-by: Tal Gitelman <tg851x@intl.att.com>
Diffstat (limited to 'asdc-tests')
88 files changed, 221 insertions, 391 deletions
diff --git a/asdc-tests/pom.xml b/asdc-tests/pom.xml index a37d1e8a9c..9cc5898fcc 100644 --- a/asdc-tests/pom.xml +++ b/asdc-tests/pom.xml @@ -47,8 +47,7 @@ <dependency> <groupId>org.mockito</groupId> - <artifactId>mockito-all</artifactId> - <version>1.10.19</version> + <artifactId>mockito-core</artifactId> <scope>compile</scope> </dependency> diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/AttSdcTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/AttSdcTest.java index 6c0b96e15c..b0627b8cfc 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/AttSdcTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/AttSdcTest.java @@ -20,8 +20,6 @@ package org.openecomp.sdc.ci.tests.api; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.io.File; @@ -43,8 +41,8 @@ import org.openecomp.sdc.ci.tests.rules.MyTestWatcher; import org.openecomp.sdc.ci.tests.run.StartTest; import org.openecomp.sdc.ci.tests.utils.Utils; import org.openecomp.sdc.ci.tests.utils.general.FileUtils; -import org.slf4j.LoggerFactory; import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import com.google.gson.Gson; import com.google.gson.GsonBuilder; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/ComponentBaseTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/ComponentBaseTest.java index 0f85cc792d..18824876cb 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/ComponentBaseTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/ComponentBaseTest.java @@ -76,7 +76,6 @@ import org.testng.annotations.BeforeSuite; import com.relevantcodes.extentreports.ExtentReports; import com.relevantcodes.extentreports.ExtentTest; import com.relevantcodes.extentreports.LogStatus; -import com.relevantcodes.extentreports.NetworkMode; import com.thinkaurelius.titan.core.TitanFactory; import com.thinkaurelius.titan.core.TitanGraph; import com.thinkaurelius.titan.core.TitanVertex; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/ComponentInstanceBaseTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/ComponentInstanceBaseTest.java index 60c226136d..90d818af77 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/ComponentInstanceBaseTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/api/ComponentInstanceBaseTest.java @@ -46,7 +46,7 @@ import org.openecomp.sdc.be.model.CapabilityDefinition; import org.openecomp.sdc.be.model.Component; import org.openecomp.sdc.be.model.ComponentInstance; import org.openecomp.sdc.be.model.Product; -import org.openecomp.sdc.be.model.RequirementAndRelationshipPair; +import org.openecomp.sdc.be.model.RelationshipInfo; import org.openecomp.sdc.be.model.RequirementCapabilityRelDef; import org.openecomp.sdc.be.model.RequirementDefinition; import org.openecomp.sdc.be.model.Resource; @@ -683,7 +683,7 @@ public class ComponentInstanceBaseTest extends ComponentBaseTest { private void deleteAssociatedFromExpected(RequirementCapabilityRelDef requirementDef) { // removing from requirements - RequirementAndRelationshipPair relationship = requirementDef.getRelationships().get(0); + RelationshipInfo relationship = requirementDef.getRelationships().get(0).getRelation(); String type = relationship.getRelationship().getType(); String fromId = requirementDef.getFromNode(); List<RequirementDefinition> reqList = expectedContainerRequirements.get(type); @@ -771,7 +771,7 @@ public class ComponentInstanceBaseTest extends ComponentBaseTest { private void addDissociatedToExpected(RequirementCapabilityRelDef requirementDef) { // adding to requirements - RequirementAndRelationshipPair relationship = requirementDef.getRelationships().get(0); + RelationshipInfo relationship = requirementDef.getRelationships().get(0).getRelation(); String type = relationship.getRelationship().getType(); String fromId = requirementDef.getFromNode(); Map<String, List<RequirementDefinition>> map = removedRequirements.get(fromId); diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/datatypes/ArtifactReqDetails.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/datatypes/ArtifactReqDetails.java index 489f229c61..28606af14d 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/datatypes/ArtifactReqDetails.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/datatypes/ArtifactReqDetails.java @@ -22,7 +22,6 @@ package org.openecomp.sdc.ci.tests.datatypes; import java.util.List; -import org.openecomp.sdc.be.model.ArtifactDefinition; import org.openecomp.sdc.be.model.HeatParameterDefinition; public class ArtifactReqDetails { diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/datatypes/ImportReqDetails.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/datatypes/ImportReqDetails.java index 638ece8c6d..0089eec5a7 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/datatypes/ImportReqDetails.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/datatypes/ImportReqDetails.java @@ -32,12 +32,9 @@ import java.io.InputStream; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; -import java.util.HashSet; import java.util.Iterator; -import java.util.LinkedHashSet; import java.util.List; import java.util.Map; -import java.util.Set; import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jettison.json.JSONArray; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/datatypes/ResourceExternalReqDetails.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/datatypes/ResourceExternalReqDetails.java index a5132e8bf6..4d5806b90f 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/datatypes/ResourceExternalReqDetails.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/datatypes/ResourceExternalReqDetails.java @@ -23,7 +23,6 @@ package org.openecomp.sdc.ci.tests.datatypes; import java.util.List; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; -import org.openecomp.sdc.be.model.Resource; public class ResourceExternalReqDetails extends ComponentReqDetails { String vendorName; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/datatypes/ServiceReqDetails.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/datatypes/ServiceReqDetails.java index 022caecf41..4be171eff0 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/datatypes/ServiceReqDetails.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/datatypes/ServiceReqDetails.java @@ -29,6 +29,7 @@ public class ServiceReqDetails extends ComponentReqDetails { String serviceType; String serviceRole; + String environmentContext; public ServiceReqDetails(String serviceName, String category, ArrayList<String> tags, String description, String contactId, String icon) { @@ -45,7 +46,7 @@ public class ServiceReqDetails extends ComponentReqDetails { categoryDefinition.setName(category); categories = new ArrayList<>(); categories.add(categoryDefinition); - + this.environmentContext = ""; } public ServiceReqDetails(Service service) { @@ -63,7 +64,7 @@ public class ServiceReqDetails extends ComponentReqDetails { this.version = service.getVersion(); this.serviceType = service.getServiceType(); this.serviceRole = service.getServiceRole(); - + this.environmentContext = service.getEnvironmentContext(); } public ServiceReqDetails() { @@ -95,4 +96,11 @@ public class ServiceReqDetails extends ComponentReqDetails { return null; } + public String getEnvironmentContext() { + return environmentContext; + } + + public void setEnvironmentContext(String environmentContext) { + this.environmentContext = environmentContext; + } } diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/datatypes/enums/LifeCycleStatesEnum.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/datatypes/enums/LifeCycleStatesEnum.java index 9edfb9aced..7c330a3d10 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/datatypes/enums/LifeCycleStatesEnum.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/datatypes/enums/LifeCycleStatesEnum.java @@ -20,8 +20,6 @@ package org.openecomp.sdc.ci.tests.datatypes.enums; -import java.util.List; - public enum LifeCycleStatesEnum { CHECKOUT("checkout", "NOT_CERTIFIED_CHECKOUT"), diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/datatypes/enums/PropertyTypeEnum.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/datatypes/enums/PropertyTypeEnum.java index 76296acf82..7e98d52109 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/datatypes/enums/PropertyTypeEnum.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/datatypes/enums/PropertyTypeEnum.java @@ -20,7 +20,6 @@ package org.openecomp.sdc.ci.tests.datatypes.enums; -import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition; import org.openecomp.sdc.be.datatypes.elements.SchemaDefinition; import org.openecomp.sdc.be.model.PropertyDefinition; import org.openecomp.sdc.be.model.tosca.ToscaPropertyType; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/TODO/ImportCapabilityTypeCITest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/TODO/ImportCapabilityTypeCITest.java index 71e75c9a1e..3af40c5bb8 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/TODO/ImportCapabilityTypeCITest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/TODO/ImportCapabilityTypeCITest.java @@ -20,9 +20,6 @@ package org.openecomp.sdc.ci.tests.execute.TODO; -import org.testng.annotations.AfterClass; -import org.testng.annotations.Test; -import org.testng.AssertJUnit; import java.io.File; import java.io.IOException; @@ -36,8 +33,11 @@ import org.apache.tinkerpop.gremlin.structure.Vertex; import org.openecomp.sdc.ci.tests.api.Urls; import org.openecomp.sdc.ci.tests.config.Config; import org.openecomp.sdc.ci.tests.utils.DbUtils; -import org.openecomp.sdc.ci.tests.utils.Utils; import org.openecomp.sdc.ci.tests.utils.DbUtils.TitanState; +import org.openecomp.sdc.ci.tests.utils.Utils; +import org.testng.AssertJUnit; +import org.testng.annotations.AfterClass; +import org.testng.annotations.Test; import fj.data.Either; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/artifacts/ArtifactServletTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/artifacts/ArtifactServletTest.java index 1f578d108c..49b556fc28 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/artifacts/ArtifactServletTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/artifacts/ArtifactServletTest.java @@ -61,10 +61,8 @@ import org.openecomp.sdc.ci.tests.datatypes.enums.ResourceCategoryEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum; import org.openecomp.sdc.ci.tests.datatypes.http.HttpHeaderEnum; import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; -import org.openecomp.sdc.ci.tests.utils.Utils; import org.openecomp.sdc.ci.tests.utils.general.AtomicOperationUtils; import org.openecomp.sdc.ci.tests.utils.general.ElementFactory; -import org.openecomp.sdc.ci.tests.utils.general.FileUtils; import org.openecomp.sdc.ci.tests.utils.rest.ArtifactRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.BaseRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ResourceRestUtils; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/artifacts/PlaceHolderValidations.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/artifacts/PlaceHolderValidations.java index 2e7b6ea4af..63d0221d32 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/artifacts/PlaceHolderValidations.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/artifacts/PlaceHolderValidations.java @@ -39,20 +39,15 @@ import org.javatuples.Pair; import org.junit.Rule; import org.junit.rules.TestName; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; import org.openecomp.sdc.be.model.ArtifactDefinition; import org.openecomp.sdc.be.model.Component; -import org.openecomp.sdc.be.model.Product; import org.openecomp.sdc.be.model.Resource; import org.openecomp.sdc.be.model.Service; import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.ci.tests.api.ComponentBaseTest; import org.openecomp.sdc.ci.tests.datatypes.ArtifactReqDetails; -import org.openecomp.sdc.ci.tests.datatypes.ComponentInstanceReqDetails; -import org.openecomp.sdc.ci.tests.datatypes.ProductReqDetails; import org.openecomp.sdc.ci.tests.datatypes.ResourceReqDetails; -import org.openecomp.sdc.ci.tests.datatypes.ServiceReqDetails; import org.openecomp.sdc.ci.tests.datatypes.enums.ArtifactTypeEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.ErrorInfo; import org.openecomp.sdc.ci.tests.datatypes.enums.LifeCycleStatesEnum; @@ -68,14 +63,11 @@ import org.openecomp.sdc.ci.tests.utils.general.ElementFactory; import org.openecomp.sdc.ci.tests.utils.general.FileUtils; import org.openecomp.sdc.ci.tests.utils.rest.ArtifactRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.BaseRestUtils; -import org.openecomp.sdc.ci.tests.utils.rest.ComponentInstanceRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.LifecycleRestUtils; -import org.openecomp.sdc.ci.tests.utils.rest.ProductRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ResourceRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ResponseParser; import org.openecomp.sdc.ci.tests.utils.rest.ServiceRestUtils; import org.openecomp.sdc.ci.tests.utils.validation.ErrorValidationUtils; -import org.openecomp.sdc.exception.ResponseFormat; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.annotations.BeforeMethod; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/artifacts/ValidateArtResponse.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/artifacts/ValidateArtResponse.java index d3ff8b7957..4c50932709 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/artifacts/ValidateArtResponse.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/artifacts/ValidateArtResponse.java @@ -20,6 +20,13 @@ package org.openecomp.sdc.ci.tests.execute.artifacts; +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + import org.junit.Rule; import org.junit.rules.TestName; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; @@ -45,13 +52,6 @@ import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import org.yaml.snakeyaml.Yaml; -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - public class ValidateArtResponse extends ComponentBaseTest { @Rule diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/category/CatalogDataApiTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/category/CatalogDataApiTest.java index 44b781f065..11c80d4a61 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/category/CatalogDataApiTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/category/CatalogDataApiTest.java @@ -20,7 +20,11 @@ package org.openecomp.sdc.ci.tests.execute.category; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import org.json.simple.JSONArray; import org.json.simple.JSONObject; @@ -34,7 +38,11 @@ import org.openecomp.sdc.ci.tests.api.Urls; import org.openecomp.sdc.ci.tests.config.Config; import org.openecomp.sdc.ci.tests.datatypes.ResourceReqDetails; import org.openecomp.sdc.ci.tests.datatypes.ServiceReqDetails; -import org.openecomp.sdc.ci.tests.datatypes.enums.*; +import org.openecomp.sdc.ci.tests.datatypes.enums.LifeCycleStatesEnum; +import org.openecomp.sdc.ci.tests.datatypes.enums.OriginTypeEnum; +import org.openecomp.sdc.ci.tests.datatypes.enums.ResourceCategoryEnum; +import org.openecomp.sdc.ci.tests.datatypes.enums.ServiceCategoriesEnum; +import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum; import org.openecomp.sdc.ci.tests.datatypes.http.HttpHeaderEnum; import org.openecomp.sdc.ci.tests.datatypes.http.HttpRequest; import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/category/CategoriesTests.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/category/CategoriesTests.java index 3b85c052a1..ade662a20c 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/category/CategoriesTests.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/category/CategoriesTests.java @@ -54,7 +54,6 @@ import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum; import org.openecomp.sdc.ci.tests.datatypes.expected.ExpectedCategoryAudit; import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; import org.openecomp.sdc.ci.tests.utils.DbUtils; -import org.openecomp.sdc.ci.tests.utils.Utils; import org.openecomp.sdc.ci.tests.utils.general.ElementFactory; import org.openecomp.sdc.ci.tests.utils.rest.BaseRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.CategoryRestUtils; @@ -62,7 +61,6 @@ import org.openecomp.sdc.ci.tests.utils.rest.ResponseParser; import org.openecomp.sdc.ci.tests.utils.validation.AuditValidationUtils; import org.openecomp.sdc.ci.tests.utils.validation.CategoryValidationUtils; import org.openecomp.sdc.ci.tests.utils.validation.ErrorValidationUtils; -import org.testng.SkipException; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/category/ElementsApiTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/category/ElementsApiTest.java index 2f48f4fa1e..7f30f8ca92 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/category/ElementsApiTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/category/ElementsApiTest.java @@ -26,7 +26,6 @@ import static org.testng.AssertJUnit.assertNotNull; import java.util.HashMap; import java.util.Map; -import org.apache.log4j.lf5.util.ResourceUtils; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.JSONValue; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/category/GroupingTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/category/GroupingTest.java index f6b6113b99..7858b3259f 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/category/GroupingTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/category/GroupingTest.java @@ -32,9 +32,6 @@ import static org.openecomp.sdc.ci.tests.utils.rest.BaseRestUtils.STATUS_CODE_RE import static org.openecomp.sdc.ci.tests.utils.rest.BaseRestUtils.STATUS_CODE_SUCCESS; import static org.testng.AssertJUnit.assertEquals; -import java.util.ArrayList; -import java.util.List; - import org.junit.Rule; import org.junit.rules.TestName; import org.openecomp.sdc.be.dao.api.ActionStatus; @@ -47,7 +44,6 @@ import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum; import org.openecomp.sdc.ci.tests.datatypes.expected.ExpectedCategoryAudit; import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; import org.openecomp.sdc.ci.tests.utils.DbUtils; -import org.openecomp.sdc.ci.tests.utils.Utils; import org.openecomp.sdc.ci.tests.utils.general.ElementFactory; import org.openecomp.sdc.ci.tests.utils.rest.CategoryRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ResponseParser; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/category/SubCategoriesTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/category/SubCategoriesTest.java index dcc3172d59..dd96ebfc2f 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/category/SubCategoriesTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/category/SubCategoriesTest.java @@ -47,7 +47,6 @@ import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum; import org.openecomp.sdc.ci.tests.datatypes.expected.ExpectedCategoryAudit; import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; import org.openecomp.sdc.ci.tests.utils.DbUtils; -import org.openecomp.sdc.ci.tests.utils.Utils; import org.openecomp.sdc.ci.tests.utils.general.ElementFactory; import org.openecomp.sdc.ci.tests.utils.rest.CategoryRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ResponseParser; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/CRUDExternalAPI.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/CRUDExternalAPI.java index 45dbf315fb..52db5bcb36 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/CRUDExternalAPI.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/CRUDExternalAPI.java @@ -20,6 +20,8 @@ package org.openecomp.sdc.ci.tests.execute.devCI; +import static java.util.Arrays.asList; + import java.io.IOException; import java.io.UnsupportedEncodingException; import java.util.Arrays; @@ -99,9 +101,6 @@ import com.relevantcodes.extentreports.LogStatus; import fj.data.Either; - -import static java.util.Arrays.asList; - public class CRUDExternalAPI extends ComponentBaseTest { private static Logger log = LoggerFactory.getLogger(CRUDExternalAPI.class.getName()); diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/HealthCheckAPI.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/HealthCheckAPI.java index 5437b80cd7..5155562e35 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/HealthCheckAPI.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/HealthCheckAPI.java @@ -4,7 +4,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -14,8 +13,8 @@ import org.openecomp.sdc.ci.tests.api.ComponentBaseTest; import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; import org.openecomp.sdc.ci.tests.utils.rest.BaseRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.CommonRestUtils; +import org.openecomp.sdc.common.api.Constants; import org.openecomp.sdc.common.api.HealthCheckInfo; -import org.openecomp.sdc.common.api.HealthCheckInfo.HealthCheckComponent; import org.openecomp.sdc.common.api.HealthCheckInfo.HealthCheckStatus; import org.openecomp.sdc.common.api.HealthCheckWrapper; import org.testng.annotations.Test; @@ -27,8 +26,6 @@ public class HealthCheckAPI extends ComponentBaseTest { @Rule public static TestName name = new TestName(); - private static final int STATUS_CODE_GET_SUCCESS = 200; - public HealthCheckAPI() { super(name, HealthCheckAPI.class.getName()); } @@ -41,18 +38,36 @@ public class HealthCheckAPI extends ComponentBaseTest { Gson gson = new Gson(); HealthCheckWrapper healthCheckInfo = gson.fromJson(healthCheckInfoResponse.getResponse(), HealthCheckWrapper.class); assertNotNull("Health check not contains components info", healthCheckInfo.getComponentsInfo()); - HealthCheckInfo amdocsHC = healthCheckInfo.getComponentsInfo().stream().filter(x -> x.getHealthCheckComponent() == HealthCheckInfo.HealthCheckComponent.ON_BOARDING).findFirst().orElse(null); + HealthCheckInfo amdocsHC = healthCheckInfo.getComponentsInfo().stream().filter(x -> x.getHealthCheckComponent().equals(Constants.HC_COMPONENT_ON_BOARDING)).findFirst().orElse(null); assertNotNull("Amdocs health check not exists in Health Check info", amdocsHC); assertEquals("Amdocs health check is down", HealthCheckInfo.HealthCheckStatus.UP, amdocsHC.getHealthCheckStatus()); - assertNotNull("Amdocs additionalInfo not exists in health check", amdocsHC.getComponentsInfo()); - Map<HealthCheckComponent, HealthCheckStatus> amdocsHCComponents = amdocsHC.getComponentsInfo().stream().collect(Collectors.toMap(HealthCheckInfo::getHealthCheckComponent, HealthCheckInfo::getHealthCheckStatus)); + assertNotNull("Amdocs componentsInfo not exists in health check", amdocsHC.getComponentsInfo()); + Map<String, HealthCheckStatus> amdocsHCComponents = amdocsHC.getComponentsInfo().stream().collect(Collectors.toMap(HealthCheckInfo::getHealthCheckComponent, HealthCheckInfo::getHealthCheckStatus)); assertNotNull(amdocsHCComponents); - assertTrue("Amdocs health check ZU component is down or not exists", amdocsHCComponents.get(HealthCheckComponent.ZU) != null && amdocsHCComponents.get(HealthCheckComponent.ZU).equals(HealthCheckStatus.UP)); - assertTrue("Amdocs health check BE component is down or not exists", amdocsHCComponents.get(HealthCheckComponent.BE) != null && amdocsHCComponents.get(HealthCheckComponent.BE).equals(HealthCheckStatus.UP)); - assertTrue("Amdocs health check CAS component is down or not exists", amdocsHCComponents.get(HealthCheckComponent.CAS) != null && amdocsHCComponents.get(HealthCheckComponent.CAS).equals(HealthCheckStatus.UP)); - assertTrue("Amdocs health check FE component is down or not exists", amdocsHCComponents.get(HealthCheckComponent.FE) != null && amdocsHCComponents.get(HealthCheckComponent.FE).equals(HealthCheckStatus.UP)); + assertTrue("Amdocs health check ZU component is down or not exists", amdocsHCComponents.get("ZU") != null && amdocsHCComponents.get("ZU").equals(HealthCheckStatus.UP)); + assertTrue("Amdocs health check BE component is down or not exists", amdocsHCComponents.get("BE") != null && amdocsHCComponents.get("BE").equals(HealthCheckStatus.UP)); + assertTrue("Amdocs health check CAS component is down or not exists", amdocsHCComponents.get("CAS") != null && amdocsHCComponents.get("CAS").equals(HealthCheckStatus.UP)); + assertTrue("Amdocs health check FE component is down or not exists", amdocsHCComponents.get("FE") != null && amdocsHCComponents.get("FE").equals(HealthCheckStatus.UP)); } - + + @Test + public void checkDcaeHealthCheckAPI() throws Exception { + RestResponse healthCheckInfoResponse = CommonRestUtils.getHealthCheck(); + BaseRestUtils.checkSuccess(healthCheckInfoResponse); + + Gson gson = new Gson(); + HealthCheckWrapper healthCheckInfo = gson.fromJson(healthCheckInfoResponse.getResponse(), HealthCheckWrapper.class); + assertNotNull("Health check not contains components info", healthCheckInfo.getComponentsInfo()); + HealthCheckInfo dcaeHC = healthCheckInfo.getComponentsInfo().stream().filter(x -> x.getHealthCheckComponent().equals(Constants.HC_COMPONENT_DCAE)).findFirst().orElse(null); + assertNotNull("DCAE health check not exists in Health Check info", dcaeHC); + assertEquals("DCAE health check is down", HealthCheckInfo.HealthCheckStatus.UP, dcaeHC.getHealthCheckStatus()); + assertNotNull("DCAE componentsInfo not exists in health check", dcaeHC.getComponentsInfo()); + Map<String, HealthCheckStatus> dcaeHCComponents = dcaeHC.getComponentsInfo().stream().collect(Collectors.toMap(HealthCheckInfo::getHealthCheckComponent, HealthCheckInfo::getHealthCheckStatus)); + assertNotNull(dcaeHCComponents); + assertTrue("DCAE health check BE component is down or not exists", dcaeHCComponents.get("BE") != null && dcaeHCComponents.get("BE").equals(HealthCheckStatus.UP)); + assertTrue("DCAE health check FE component is down or not exists", dcaeHCComponents.get("FE") != null && dcaeHCComponents.get("FE").equals(HealthCheckStatus.UP)); + } + @Test public void checkCassandraHealthCheck() throws Exception { RestResponse healthCheckInfoResponse = CommonRestUtils.getHealthCheck(); @@ -61,7 +76,7 @@ public class HealthCheckAPI extends ComponentBaseTest { Gson gson = new Gson(); HealthCheckWrapper healthCheckInfo = gson.fromJson(healthCheckInfoResponse.getResponse(), HealthCheckWrapper.class); assertNotNull("Health check not contains components info", healthCheckInfo.getComponentsInfo()); - HealthCheckInfo cassandraHC = healthCheckInfo.getComponentsInfo().stream().filter(x -> x.getHealthCheckComponent() == HealthCheckInfo.HealthCheckComponent.CASSANDRA).findFirst().orElse(null); + HealthCheckInfo cassandraHC = healthCheckInfo.getComponentsInfo().stream().filter(x -> x.getHealthCheckComponent().equals(Constants.HC_COMPONENT_CASSANDRA)).findFirst().orElse(null); assertNotNull("Cassandra health check not exists in Health Check info", cassandraHC); assertEquals("Cassandra health check is down", HealthCheckInfo.HealthCheckStatus.UP, cassandraHC.getHealthCheckStatus()); } diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/ImportCsarUpdate.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/ImportCsarUpdate.java index dd078377db..87eb6dc696 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/ImportCsarUpdate.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/ImportCsarUpdate.java @@ -20,20 +20,15 @@ package org.openecomp.sdc.ci.tests.execute.devCI; -import static org.testng.AssertJUnit.assertTrue; - import org.junit.Rule; import org.junit.rules.TestName; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; import org.openecomp.sdc.be.model.Component; import org.openecomp.sdc.be.model.Resource; -import org.openecomp.sdc.be.model.Service; import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.ci.tests.api.ComponentBaseTest; import org.openecomp.sdc.ci.tests.datatypes.ResourceReqDetails; -import org.openecomp.sdc.ci.tests.datatypes.enums.ArtifactTypeEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.LifeCycleStatesEnum; -import org.openecomp.sdc.ci.tests.datatypes.enums.NormativeTypesEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum; import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; import org.openecomp.sdc.ci.tests.execute.imports.ImportCsarResourceTest; @@ -42,7 +37,6 @@ import org.openecomp.sdc.ci.tests.utils.general.ElementFactory; import org.openecomp.sdc.ci.tests.utils.rest.BaseRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ResourceRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ResponseParser; -import org.openecomp.sdc.ci.tests.utils.validation.CsarValidationUtils; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/ImportCsarValidateArtifacts.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/ImportCsarValidateArtifacts.java index 5ed71e53b0..49e5950db5 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/ImportCsarValidateArtifacts.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/ImportCsarValidateArtifacts.java @@ -25,16 +25,11 @@ import static org.testng.AssertJUnit.assertTrue; import org.junit.Rule; import org.junit.rules.TestName; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; -import org.openecomp.sdc.be.model.Component; import org.openecomp.sdc.be.model.Resource; -import org.openecomp.sdc.be.model.Service; import org.openecomp.sdc.ci.tests.api.ComponentBaseTest; import org.openecomp.sdc.ci.tests.datatypes.ResourceReqDetails; -import org.openecomp.sdc.ci.tests.datatypes.enums.ArtifactTypeEnum; -import org.openecomp.sdc.ci.tests.datatypes.enums.LifeCycleStatesEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum; import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; -import org.openecomp.sdc.ci.tests.utils.general.AtomicOperationUtils; import org.openecomp.sdc.ci.tests.utils.general.ElementFactory; import org.openecomp.sdc.ci.tests.utils.rest.BaseRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ResourceRestUtils; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/OpsRejectDistribution.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/OpsRejectDistribution.java index 2ac31183d3..989158ca1e 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/OpsRejectDistribution.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/OpsRejectDistribution.java @@ -20,15 +20,11 @@ package org.openecomp.sdc.ci.tests.execute.devCI; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertTrue; - import org.junit.Rule; import org.junit.rules.TestName; import org.openecomp.sdc.be.model.Component; import org.openecomp.sdc.be.model.Service; import org.openecomp.sdc.be.model.User; -import org.openecomp.sdc.be.utils.CommonBeUtils; import org.openecomp.sdc.ci.tests.api.ComponentBaseTest; import org.openecomp.sdc.ci.tests.datatypes.ServiceReqDetails; import org.openecomp.sdc.ci.tests.datatypes.enums.LifeCycleStatesEnum; @@ -37,11 +33,8 @@ import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; import org.openecomp.sdc.ci.tests.utils.general.AtomicOperationUtils; import org.openecomp.sdc.ci.tests.utils.general.ElementFactory; import org.openecomp.sdc.ci.tests.utils.rest.BaseRestUtils; -import org.openecomp.sdc.ci.tests.utils.rest.ComponentRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ResponseParser; import org.openecomp.sdc.ci.tests.utils.rest.ServiceRestUtils; -import org.testng.annotations.AfterTest; -import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; public class OpsRejectDistribution extends ComponentBaseTest { diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/SearchFilterCategoryExternalAPI.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/SearchFilterCategoryExternalAPI.java index af4b9380fd..3f804a31b1 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/SearchFilterCategoryExternalAPI.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/SearchFilterCategoryExternalAPI.java @@ -20,13 +20,6 @@ package org.openecomp.sdc.ci.tests.execute.devCI; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.util.Base64.Decoder; - -import javax.json.Json; - import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -34,75 +27,33 @@ import java.util.List; import java.util.Map; import java.util.Random; -import org.apache.cassandra.cli.CliParser.operator_return; -import org.apache.http.HttpEntity; -import org.apache.http.HttpResponse; -import org.apache.http.client.HttpResponseException; -import org.apache.http.client.methods.CloseableHttpResponse; -import org.apache.http.client.methods.HttpDelete; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.entity.StringEntity; -import org.apache.http.impl.client.BasicResponseHandler; -import org.apache.http.util.EntityUtils; -import org.codehaus.jackson.map.ObjectMapper; -import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; -import org.json.simple.parser.ParseException; import org.junit.Rule; import org.junit.rules.TestName; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.dao.graph.datatype.ActionEnum; import org.openecomp.sdc.be.datatypes.enums.AssetTypeEnum; -import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; -import org.openecomp.sdc.be.model.ArtifactDefinition; -import org.openecomp.sdc.be.model.ArtifactUiDownloadData; -import org.openecomp.sdc.be.model.Component; -import org.openecomp.sdc.be.model.ComponentInstance; import org.openecomp.sdc.be.model.Resource; -import org.openecomp.sdc.be.model.Service; -import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.be.model.category.CategoryDefinition; import org.openecomp.sdc.be.model.category.SubCategoryDefinition; import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum; import org.openecomp.sdc.ci.tests.api.ComponentBaseTest; -import org.openecomp.sdc.ci.tests.api.Urls; import org.openecomp.sdc.ci.tests.config.Config; -import org.openecomp.sdc.ci.tests.datatypes.ArtifactReqDetails; -import org.openecomp.sdc.ci.tests.datatypes.ResourceDetailedAssetStructure; import org.openecomp.sdc.ci.tests.datatypes.ResourceReqDetails; -import org.openecomp.sdc.ci.tests.datatypes.ServiceReqDetails; -import org.openecomp.sdc.ci.tests.datatypes.enums.ArtifactTypeEnum; -import org.openecomp.sdc.ci.tests.datatypes.enums.DistributionNotificationStatusEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.ErrorInfo; -import org.openecomp.sdc.ci.tests.datatypes.enums.LifeCycleStatesEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.NormativeTypesEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.ResourceCategoryEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.SearchCriteriaEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum; import org.openecomp.sdc.ci.tests.datatypes.expected.ExpectedExternalAudit; -import org.openecomp.sdc.ci.tests.datatypes.expected.ExpectedResourceAuditJavaObject; -import org.openecomp.sdc.ci.tests.datatypes.http.HttpHeaderEnum; import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; -import org.openecomp.sdc.ci.tests.utils.Utils; import org.openecomp.sdc.ci.tests.utils.general.AtomicOperationUtils; import org.openecomp.sdc.ci.tests.utils.general.ElementFactory; -import org.openecomp.sdc.ci.tests.utils.rest.ArtifactRestUtils; -import org.openecomp.sdc.ci.tests.utils.rest.AssetRestUtils; -import org.openecomp.sdc.ci.tests.utils.rest.BaseRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.CategoryRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ResourceRestUtils; -import org.openecomp.sdc.ci.tests.utils.rest.ResponseParser; import org.openecomp.sdc.ci.tests.utils.validation.AuditValidationUtils; -import org.openecomp.sdc.ci.tests.utils.validation.DistributionValidationUtils; import org.openecomp.sdc.ci.tests.utils.validation.ErrorValidationUtils; -import org.openecomp.sdc.common.api.ApplicationErrorCodesEnum; -import org.openecomp.sdc.common.api.ArtifactGroupTypeEnum; -import org.openecomp.sdc.common.api.Constants; -import org.openecomp.sdc.common.api.UploadArtifactInfo; import org.openecomp.sdc.common.datastructure.AuditingFieldsKeysEnum; -import org.openecomp.sdc.common.util.GeneralUtility; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.Assert; @@ -110,20 +61,10 @@ import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; -import org.openecomp.sdc.utils.Pair; -import com.google.common.base.CaseFormat; import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonElement; -import com.google.gson.JsonObject; import com.google.gson.JsonParser; -import com.relevantcodes.extentreports.LogStatus; - -import fj.P; -import fj.data.Either; -import it.unimi.dsi.fastutil.bytes.ByteSortedSets.SynchronizedSortedSet; - -import static java.util.Arrays.asList; public class SearchFilterCategoryExternalAPI extends ComponentBaseTest { diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/ToscaGroupInsideVF.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/ToscaGroupInsideVF.java index 3264efb280..bb86f8f336 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/ToscaGroupInsideVF.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/ToscaGroupInsideVF.java @@ -20,8 +20,6 @@ package org.openecomp.sdc.ci.tests.execute.devCI; -import static org.testng.AssertJUnit.assertEquals; - import java.util.HashMap; import java.util.Map; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/VFCMTExternalAPI.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/VFCMTExternalAPI.java index 955b501db1..ce6103e7c2 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/VFCMTExternalAPI.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/VFCMTExternalAPI.java @@ -22,7 +22,6 @@ package org.openecomp.sdc.ci.tests.execute.devCI; import static java.util.Arrays.asList; -import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -63,7 +62,6 @@ import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; -import com.google.common.util.concurrent.ListeningExecutorService; import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonElement; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/ValidateConformanceLevel.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/ValidateConformanceLevel.java index 24c91935d4..d9548bd4f8 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/ValidateConformanceLevel.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/ValidateConformanceLevel.java @@ -20,7 +20,6 @@ package org.openecomp.sdc.ci.tests.execute.devCI; -import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; import org.junit.Rule; @@ -28,7 +27,6 @@ import org.junit.rules.TestName; import org.openecomp.sdc.be.model.Component; import org.openecomp.sdc.be.model.Service; import org.openecomp.sdc.be.model.User; -import org.openecomp.sdc.be.utils.CommonBeUtils; import org.openecomp.sdc.ci.tests.api.ComponentBaseTest; import org.openecomp.sdc.ci.tests.datatypes.ServiceReqDetails; import org.openecomp.sdc.ci.tests.datatypes.enums.LifeCycleStatesEnum; @@ -40,8 +38,6 @@ import org.openecomp.sdc.ci.tests.utils.rest.BaseRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ComponentRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ResponseParser; import org.openecomp.sdc.ci.tests.utils.rest.ServiceRestUtils; -import org.testng.annotations.AfterTest; -import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; public class ValidateConformanceLevel extends ComponentBaseTest { diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/test1.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/test1.java index be32d544ec..cd0332e768 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/test1.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/test1.java @@ -20,10 +20,6 @@ package org.openecomp.sdc.ci.tests.execute.devCI; -import static org.testng.AssertJUnit.assertNotNull; - -import java.io.IOException; -import java.text.ParseException; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -44,14 +40,11 @@ import org.openecomp.sdc.ci.tests.datatypes.enums.ResourceCategoryEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.ServiceCategoriesEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum; import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; -import org.openecomp.sdc.ci.tests.utils.DistributionUtils; import org.openecomp.sdc.ci.tests.utils.Utils; import org.openecomp.sdc.ci.tests.utils.general.AtomicOperationUtils; import org.openecomp.sdc.ci.tests.utils.validation.DistributionValidationUtils; import org.testng.annotations.Test; -import org.openecomp.sdc.utils.DistributionStatusEnum; - import fj.data.Either; public class test1 extends ComponentBaseTest{ diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/externalapi/UserAPIs.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/externalapi/UserAPIs.java index 157f3157b8..3083188fa3 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/externalapi/UserAPIs.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/externalapi/UserAPIs.java @@ -20,7 +20,8 @@ package org.openecomp.sdc.ci.tests.execute.externalapi; -import static org.testng.AssertJUnit.*; +import static org.testng.AssertJUnit.assertFalse; +import static org.testng.AssertJUnit.assertTrue; import java.io.IOException; import java.lang.reflect.Type; @@ -47,18 +48,12 @@ import org.openecomp.sdc.ci.tests.utils.general.ElementFactory; import org.openecomp.sdc.ci.tests.utils.rest.BaseRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.EcompUserRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ResourceRestUtils; -import org.openecomp.sdc.ci.tests.utils.rest.ResponseParser; import org.openecomp.sdc.ci.tests.utils.rest.UserRestUtils; -import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; -import fj.data.Either; - -import org.testng.Assert; - public class UserAPIs extends ComponentBaseTest { @Rule diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/general/BasicHttpAuthenticationTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/general/BasicHttpAuthenticationTest.java index c52ee470cf..b820c7d803 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/general/BasicHttpAuthenticationTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/general/BasicHttpAuthenticationTest.java @@ -52,7 +52,6 @@ import org.openecomp.sdc.ci.tests.datatypes.expected.ExpectedAuthenticationAudit import org.openecomp.sdc.ci.tests.datatypes.http.HttpHeaderEnum; import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; import org.openecomp.sdc.ci.tests.utils.DbUtils; -import org.openecomp.sdc.ci.tests.utils.Utils; import org.openecomp.sdc.ci.tests.utils.general.AtomicOperationUtils; import org.openecomp.sdc.ci.tests.utils.general.ElementFactory; import org.openecomp.sdc.ci.tests.utils.rest.ArtifactRestUtils; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/general/ManageEcompConsumerCredentials.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/general/ManageEcompConsumerCredentials.java index 1551c99e66..12390eb2fc 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/general/ManageEcompConsumerCredentials.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/general/ManageEcompConsumerCredentials.java @@ -35,7 +35,6 @@ import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum; import org.openecomp.sdc.ci.tests.datatypes.expected.ExpectedEcomConsumerAudit; import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; import org.openecomp.sdc.ci.tests.utils.DbUtils; -import org.openecomp.sdc.ci.tests.utils.Utils; import org.openecomp.sdc.ci.tests.utils.general.ElementFactory; import org.openecomp.sdc.ci.tests.utils.rest.ConsumerRestUtils; import org.openecomp.sdc.ci.tests.utils.validation.AuditValidationUtils; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/ExportToscaTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/ExportToscaTest.java index 2edd3284c4..828326e3da 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/ExportToscaTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/ExportToscaTest.java @@ -26,8 +26,6 @@ import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.openecomp.sdc.ci.tests.utils.ToscaParserUtils.downloadAndParseToscaTemplate; -import java.io.ByteArrayInputStream; -import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; @@ -36,17 +34,14 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; -import java.util.stream.Collectors; import java.util.Optional; +import java.util.stream.Collectors; import org.apache.commons.codec.binary.Base64; import org.junit.Rule; import org.junit.rules.TestName; -import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; import org.openecomp.sdc.be.model.ArtifactDefinition; -import org.openecomp.sdc.be.model.ArtifactUiDownloadData; -import org.openecomp.sdc.be.model.Component; import org.openecomp.sdc.be.model.ComponentInstInputsMap; import org.openecomp.sdc.be.model.ComponentInstance; import org.openecomp.sdc.be.model.ComponentInstanceInput; @@ -68,10 +63,7 @@ import org.openecomp.sdc.ci.tests.datatypes.enums.LifeCycleStatesEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.ServiceCategoriesEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum; import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; -import org.openecomp.sdc.ci.tests.utils.general.AtomicOperationUtils; import org.openecomp.sdc.ci.tests.utils.general.ElementFactory; -import org.openecomp.sdc.ci.tests.utils.general.ImportUtils; -import org.openecomp.sdc.ci.tests.utils.rest.ArtifactRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.BaseRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ComponentInstanceRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.InputsRestUtils; @@ -83,7 +75,6 @@ import org.openecomp.sdc.ci.tests.utils.validation.BaseValidationUtils; import org.openecomp.sdc.common.api.Constants; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; -import org.yaml.snakeyaml.Yaml; import com.google.gson.Gson; import com.google.gson.JsonParser; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/FilteredDataByParamsComponentServletTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/FilteredDataByParamsComponentServletTest.java index e434f88ad5..c1b3181600 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/FilteredDataByParamsComponentServletTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/FilteredDataByParamsComponentServletTest.java @@ -22,28 +22,19 @@ package org.openecomp.sdc.ci.tests.execute.imports; import static org.testng.AssertJUnit.assertEquals; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; import java.util.ArrayList; -import java.util.Collections; import java.util.List; -import org.apache.commons.codec.binary.Base64; import org.junit.rules.TestName; -import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; import org.openecomp.sdc.be.model.ArtifactDefinition; -import org.openecomp.sdc.be.model.ComponentInstance; import org.openecomp.sdc.be.model.Resource; import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.be.ui.model.UiComponentDataTransfer; import org.openecomp.sdc.be.ui.model.UiResourceDataTransfer; import org.openecomp.sdc.ci.tests.api.ComponentBaseTest; -import org.openecomp.sdc.ci.tests.datatypes.ImportReqDetails; import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum; import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; import org.openecomp.sdc.ci.tests.utils.general.ElementFactory; -import org.openecomp.sdc.ci.tests.utils.rest.BaseRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ResourceRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ResponseParser; import org.testng.annotations.Test; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/ImportCsarResourceTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/ImportCsarResourceTest.java index f0421fb026..f3b134f6a9 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/ImportCsarResourceTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/ImportCsarResourceTest.java @@ -39,8 +39,6 @@ import java.util.stream.Collectors; import org.apache.commons.codec.binary.Base64; import org.apache.commons.lang.WordUtils; -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.tinkerpop.gremlin.process.traversal.P; import org.junit.Rule; import org.junit.rules.TestName; import org.openecomp.sdc.be.dao.api.ActionStatus; @@ -48,14 +46,12 @@ import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; import org.openecomp.sdc.be.model.ArtifactDefinition; import org.openecomp.sdc.be.model.CapabilityDefinition; import org.openecomp.sdc.be.model.ComponentInstance; -import org.openecomp.sdc.be.model.ComponentInstanceProperty; import org.openecomp.sdc.be.model.GroupDefinition; import org.openecomp.sdc.be.model.GroupProperty; import org.openecomp.sdc.be.model.RequirementCapabilityRelDef; import org.openecomp.sdc.be.model.Resource; import org.openecomp.sdc.be.model.Service; import org.openecomp.sdc.be.model.User; -import org.openecomp.sdc.be.model.tosca.ToscaPropertyType; import org.openecomp.sdc.ci.tests.api.ComponentBaseTest; import org.openecomp.sdc.ci.tests.api.Urls; import org.openecomp.sdc.ci.tests.config.Config; @@ -82,7 +78,6 @@ import org.openecomp.sdc.ci.tests.utils.rest.ResourceRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ResponseParser; import org.openecomp.sdc.ci.tests.utils.rest.ServiceRestUtils; import org.openecomp.sdc.ci.tests.utils.validation.ErrorValidationUtils; -import org.openecomp.sdc.common.api.ArtifactGroupTypeEnum; import org.openecomp.sdc.common.util.ValidationUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -1502,8 +1497,8 @@ public class ImportCsarResourceTest extends ComponentBaseTest { String cp1Uid = nodes.get("cp1node").getUniqueId(); String cp2Uid = nodes.get("cp2node").getUniqueId(); Map<String, List<RequirementCapabilityRelDef>> mappedByReqOwner = resource.getComponentInstancesRelations().stream().collect(Collectors.groupingBy(e -> e.getFromNode())); - assertEquals(mappedByReqOwner.get(cp1Uid).get(0).getRelationships().get(0).getCapabilityUid(), capabilities.get("virtual_linkable").getUniqueId()); - assertEquals(mappedByReqOwner.get(cp2Uid).get(0).getRelationships().get(0).getCapabilityUid(), capabilities.get("link").getUniqueId()); + assertEquals(mappedByReqOwner.get(cp1Uid).get(0).getRelationships().get(0).getRelation().getCapabilityUid(), capabilities.get("virtual_linkable").getUniqueId()); + assertEquals(mappedByReqOwner.get(cp2Uid).get(0).getRelationships().get(0).getRelation().getCapabilityUid(), capabilities.get("link").getUniqueId()); } @Test(enabled = true) diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/ImportGenericResourceCITest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/ImportGenericResourceCITest.java index 7957edc9a7..aa02a3e8c7 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/ImportGenericResourceCITest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/ImportGenericResourceCITest.java @@ -46,7 +46,6 @@ import org.apache.http.entity.mime.content.FileBody; import org.apache.http.entity.mime.content.StringBody; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; - import org.junit.Rule; import org.junit.rules.TestName; import org.openecomp.sdc.be.model.LifecycleStateEnum; @@ -66,7 +65,6 @@ import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; import org.openecomp.sdc.ci.tests.execute.TODO.ImportCapabilityTypeCITest; import org.openecomp.sdc.ci.tests.utils.DbUtils; import org.openecomp.sdc.ci.tests.utils.Utils; -import org.openecomp.sdc.ci.tests.utils.rest.BaseRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ImportRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ResourceRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ResponseParser; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/ImportToscaResourceTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/ImportToscaResourceTest.java index ef95b34198..7a8a764e2e 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/ImportToscaResourceTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/ImportToscaResourceTest.java @@ -33,7 +33,6 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; -import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; @@ -48,11 +47,12 @@ import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; import org.openecomp.sdc.be.model.CapReqDef; import org.openecomp.sdc.be.model.CapabilityDefinition; +import org.openecomp.sdc.be.model.CapabilityRequirementRelationship; import org.openecomp.sdc.be.model.ComponentInstance; import org.openecomp.sdc.be.model.LifecycleStateEnum; import org.openecomp.sdc.be.model.PropertyDefinition; import org.openecomp.sdc.be.model.RelationshipImpl; -import org.openecomp.sdc.be.model.RequirementAndRelationshipPair; +import org.openecomp.sdc.be.model.RelationshipInfo; import org.openecomp.sdc.be.model.RequirementCapabilityRelDef; import org.openecomp.sdc.be.model.RequirementDefinition; import org.openecomp.sdc.be.model.Resource; @@ -94,8 +94,6 @@ import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; -import aj.org.objectweb.asm.Attribute; - /** * * @author Andrey + Pavel + Shay @@ -115,7 +113,6 @@ public class ImportToscaResourceTest extends ComponentBaseTest { protected static User testerUser; protected String testResourcesPath; protected ResourceReqDetails resourceDetails; - private HashSet<String> capabilitySources; private int actualNumOfReqOrCap; @Rule @@ -130,7 +127,6 @@ public class ImportToscaResourceTest extends ComponentBaseTest { String sourceDir = config.getResourceConfigDir(); final String workDir = "importToscaResourceByCreateUrl"; testResourcesPath = sourceDir + File.separator + workDir; - capabilitySources = new HashSet<String>(); actualNumOfReqOrCap = 0; } @@ -1341,7 +1337,7 @@ public class ImportToscaResourceTest extends ComponentBaseTest { requirementDef.setFromNode(riReq.getUniqueId()); requirementDef.setToNode(riCap.getUniqueId()); - RequirementAndRelationshipPair pair = new RequirementAndRelationshipPair(); + RelationshipInfo pair = new RelationshipInfo(); pair.setRequirementOwnerId(riReq.getUniqueId()); pair.setCapabilityOwnerId(riCap.getUniqueId()); pair.setRequirement("VirtualBinding"); @@ -1350,8 +1346,10 @@ public class ImportToscaResourceTest extends ComponentBaseTest { pair.setRelationships(relationship); pair.setCapabilityUid(capbilityUid); pair.setRequirementUid(requirementUid); - List<RequirementAndRelationshipPair> relationships = new ArrayList<>(); - relationships.add(pair); + CapabilityRequirementRelationship capReqRel = new CapabilityRequirementRelationship(); + capReqRel.setRelation(pair); + List<CapabilityRequirementRelationship> relationships = new ArrayList<>(); + relationships.add(capReqRel); requirementDef.setRelationships(relationships); RestResponse associateInstances = ComponentInstanceRestUtils.associateInstances(requirementDef, sdncUserDetails, diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/ImportUpdateResourseCsarTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/ImportUpdateResourseCsarTest.java index 464ebe12ed..9e8b94e5a8 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/ImportUpdateResourseCsarTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/ImportUpdateResourseCsarTest.java @@ -21,7 +21,6 @@ package org.openecomp.sdc.ci.tests.execute.imports; import static org.testng.AssertJUnit.assertTrue; -import static org.testng.AssertJUnit.assertEquals; import java.nio.file.Files; import java.nio.file.Path; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/ToscaTemplateVersionTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/ToscaTemplateVersionTest.java index 1fbcd428ca..4a9e9beff4 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/ToscaTemplateVersionTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/ToscaTemplateVersionTest.java @@ -1,10 +1,14 @@ package org.openecomp.sdc.ci.tests.execute.imports; +import static org.junit.Assert.assertEquals; + +import java.nio.file.Paths; +import java.util.Map; + import org.junit.rules.TestName; import org.openecomp.sdc.be.model.Service; import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.ci.tests.api.ComponentBaseTest; -import org.openecomp.sdc.ci.tests.config.Config; import org.openecomp.sdc.ci.tests.datatypes.ImportReqDetails; import org.openecomp.sdc.ci.tests.datatypes.ServiceReqDetails; import org.openecomp.sdc.ci.tests.datatypes.enums.ServiceCategoriesEnum; @@ -20,12 +24,6 @@ import org.openecomp.sdc.ci.tests.utils.rest.ServiceRestUtils; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; -import java.io.File; -import java.nio.file.Paths; -import java.util.Map; - -import static org.junit.Assert.assertEquals; - public class ToscaTemplateVersionTest extends ComponentBaseTest { private static final String EXPECTED_EXPORT_TOSCA_VERSION = "tosca_simple_yaml_1_1"; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/property/ComponentInstancePropertyTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/property/ComponentInstancePropertyTest.java index c9aa44a6c0..fdde5e571a 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/property/ComponentInstancePropertyTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/property/ComponentInstancePropertyTest.java @@ -49,7 +49,6 @@ import org.openecomp.sdc.ci.tests.utils.general.ElementFactory; import org.openecomp.sdc.ci.tests.utils.rest.BaseRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ComponentInstanceRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.PropertyRestUtils; -import org.openecomp.sdc.ci.tests.utils.rest.ResourceRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ResponseParser; import org.openecomp.sdc.ci.tests.utils.rest.ServiceRestUtils; import org.testng.annotations.BeforeMethod; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/property/PropertyApisTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/property/PropertyApisTest.java index 6a5aeec5c9..9f0dff9b42 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/property/PropertyApisTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/property/PropertyApisTest.java @@ -28,7 +28,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.apache.log4j.lf5.util.ResourceUtils; import org.json.simple.JSONObject; import org.json.simple.JSONValue; import org.junit.Rule; @@ -46,7 +45,6 @@ import org.openecomp.sdc.ci.tests.datatypes.http.HttpHeaderEnum; import org.openecomp.sdc.ci.tests.datatypes.http.HttpRequest; import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; import org.openecomp.sdc.ci.tests.preRequisites.SimpleOneRsrcOneServiceTest; -import org.openecomp.sdc.ci.tests.utils.Utils; import org.openecomp.sdc.ci.tests.utils.general.ElementFactory; import org.openecomp.sdc.ci.tests.utils.rest.PropertyRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ResourceRestUtils; @@ -57,8 +55,6 @@ import org.testng.AssertJUnit; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; -import com.google.gson.Gson; - public class PropertyApisTest extends SimpleOneRsrcOneServiceTest { protected static final String RESOURCE_CATEGORY = "Generic/Databases"; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/CheckGetResource.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/CheckGetResource.java index 0ec6b00fdc..85dfe4e13a 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/CheckGetResource.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/CheckGetResource.java @@ -25,7 +25,6 @@ import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; import org.openecomp.sdc.ci.tests.utils.rest.ResourceRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ResponseParser; import org.openecomp.sdc.common.util.SerializationUtils; -import org.testng.annotations.Test; import fj.data.Either; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/ComponentRelationshipInVfTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/ComponentRelationshipInVfTest.java index 4847491759..903ffbaca7 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/ComponentRelationshipInVfTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/ComponentRelationshipInVfTest.java @@ -39,9 +39,10 @@ import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; import org.openecomp.sdc.be.model.CapReqDef; import org.openecomp.sdc.be.model.CapabilityDefinition; +import org.openecomp.sdc.be.model.CapabilityRequirementRelationship; import org.openecomp.sdc.be.model.ComponentInstance; import org.openecomp.sdc.be.model.RelationshipImpl; -import org.openecomp.sdc.be.model.RequirementAndRelationshipPair; +import org.openecomp.sdc.be.model.RelationshipInfo; import org.openecomp.sdc.be.model.RequirementCapabilityRelDef; import org.openecomp.sdc.be.model.RequirementDefinition; import org.openecomp.sdc.be.model.Resource; @@ -71,16 +72,12 @@ public class ComponentRelationshipInVfTest extends ComponentBaseTest { private ResourceReqDetails resourceDetailsVF; private User designerUser; - private User adminUser; - private User testerUser; private ResourceReqDetails resourceDetailsReq; private ResourceReqDetails resourceDetailsCap; @BeforeMethod public void before() throws Exception { designerUser = ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER); - adminUser = ElementFactory.getDefaultUser(UserRoleEnum.ADMIN); - testerUser = ElementFactory.getDefaultUser(UserRoleEnum.TESTER); resourceDetailsVF = ElementFactory.getDefaultResourceByType("VF100", NormativeTypesEnum.ROOT, ResourceCategoryEnum.GENERIC_INFRASTRUCTURE, designerUser.getUserId(), ResourceTypeEnum.VF.toString()); @@ -119,7 +116,7 @@ public class ComponentRelationshipInVfTest extends ComponentBaseTest { requirementDef.setFromNode(riReq.getUniqueId()); requirementDef.setToNode(riCap.getUniqueId()); - RequirementAndRelationshipPair pair = new RequirementAndRelationshipPair(); + RelationshipInfo pair = new RelationshipInfo(); pair.setRequirementOwnerId(riReq.getUniqueId()); pair.setCapabilityOwnerId(riCap.getUniqueId()); pair.setRequirement("host"); @@ -128,8 +125,10 @@ public class ComponentRelationshipInVfTest extends ComponentBaseTest { pair.setRelationships(relationship); pair.setCapabilityUid(capbilityUid); pair.setRequirementUid(requirementUid); - List<RequirementAndRelationshipPair> relationships = new ArrayList<>(); - relationships.add(pair); + List<CapabilityRequirementRelationship> relationships = new ArrayList<>(); + CapabilityRequirementRelationship capReqRel = new CapabilityRequirementRelationship(); + capReqRel.setRelation(pair); + relationships.add(capReqRel); requirementDef.setRelationships(relationships); return requirementDef; } @@ -179,7 +178,7 @@ public class ComponentRelationshipInVfTest extends ComponentBaseTest { requirementDef.setFromNode(riReq.getUniqueId()); requirementDef.setToNode(riCap.getUniqueId()); - RequirementAndRelationshipPair pair = new RequirementAndRelationshipPair(); + RelationshipInfo pair = new RelationshipInfo(); pair.setRequirementOwnerId(riReq.getUniqueId()); pair.setCapabilityOwnerId(riCap.getUniqueId()); pair.setRequirement("host"); @@ -188,8 +187,10 @@ public class ComponentRelationshipInVfTest extends ComponentBaseTest { pair.setRelationships(relationship); pair.setCapabilityUid(capList.get(0).getUniqueId()); pair.setRequirementUid(reqList.get(0).getUniqueId()); - List<RequirementAndRelationshipPair> relationships = new ArrayList<>(); - relationships.add(pair); + List<CapabilityRequirementRelationship> relationships = new ArrayList<>(); + CapabilityRequirementRelationship capReqRel = new CapabilityRequirementRelationship(); + capReqRel.setRelation(pair); + relationships.add(capReqRel); requirementDef.setRelationships(relationships); RestResponse associateInstances = ComponentInstanceRestUtils.associateInstances(requirementDef, designerUser, @@ -367,10 +368,8 @@ public class ComponentRelationshipInVfTest extends ComponentBaseTest { public void associateCpToVfTest() throws Exception { createTwoAtomicResourcesByType(ResourceTypeEnum.CP.toString(), ResourceTypeEnum.VL.toString()); - ComponentInstance riCapInVfInstance = createComponentInstance(resourceDetailsCap, designerUser, - resourceDetailsVF); - ComponentInstance riReqInVfInstance = createComponentInstance(resourceDetailsReq, designerUser, - resourceDetailsVF); + createComponentInstance(resourceDetailsCap, designerUser, resourceDetailsVF); + createComponentInstance(resourceDetailsReq, designerUser, resourceDetailsVF); ResourceReqDetails vfHigh = new ResourceReqDetails(resourceDetailsVF, "0.1"); vfHigh.setName("vfHigh"); @@ -510,10 +509,6 @@ public class ComponentRelationshipInVfTest extends ComponentBaseTest { ComponentInstance riCap = createComponentInstance(resourceDetailsCap); CapReqDef capReqDefBeforeAssociate = getResourceReqCap(); - Map<String, List<CapabilityDefinition>> capabilitiesBeforeAssociate = capReqDefBeforeAssociate - .getCapabilities(); - Map<String, List<RequirementDefinition>> requirementsBeforeAssociate = capReqDefBeforeAssociate - .getRequirements(); RequirementCapabilityRelDef requirementDef = setRelationshipBetweenInstances(riReq, riCap, capReqDefBeforeAssociate); @@ -544,10 +539,6 @@ public class ComponentRelationshipInVfTest extends ComponentBaseTest { ComponentInstance riCap = createComponentInstance(resourceDetailsCap); CapReqDef capReqDefBeforeAssociate = getResourceReqCap(); - Map<String, List<CapabilityDefinition>> capabilitiesBeforeAssociate = capReqDefBeforeAssociate - .getCapabilities(); - Map<String, List<RequirementDefinition>> requirementsBeforeAssociate = capReqDefBeforeAssociate - .getRequirements(); RequirementCapabilityRelDef requirementDef = setRelationshipBetweenInstances(riReq, riCap, capReqDefBeforeAssociate); @@ -979,7 +970,7 @@ public class ComponentRelationshipInVfTest extends ComponentBaseTest { RequirementCapabilityRelDef requirementDef = setRelationshipBetweenInstances(riReq, riCap, capReqDefBeforeAssociate); assertTrue(requirementDef.getRelationships().size() == 1); - String requirement = requirementDef.getRelationships().get(0).getRequirement(); + String requirement = requirementDef.getRelationships().get(0).getRelation().getRequirement(); RestResponse associateInstances = ComponentInstanceRestUtils.associateInstances(requirementDef, designerUser, resourceDetailsVF.getUniqueId(), ComponentTypeEnum.RESOURCE); assertEquals("Check response code ", 404, associateInstances.getErrorCode().intValue()); @@ -1122,7 +1113,7 @@ public class ComponentRelationshipInVfTest extends ComponentBaseTest { .getCapabilities(); Map<String, List<RequirementDefinition>> requirementsBeforeAssociate = capReqDefBeforeAssociate .getRequirements(); - String requirementName = requirementDef.getRelationships().get(0).getRequirement(); + String requirementName = requirementDef.getRelationships().get(0).getRelation().getRequirement(); RestResponse dissociateInstances = ComponentInstanceRestUtils.dissociateInstances(requirementDef, designerUser, resourceDetailsVF.getUniqueId(), ComponentTypeEnum.RESOURCE); @@ -1152,10 +1143,6 @@ public class ComponentRelationshipInVfTest extends ComponentBaseTest { RequirementCapabilityRelDef requirementDef = setRelationshipBetweenInstances(riReq, riCap, capReqDefBeforeAssociate); - Map<String, List<CapabilityDefinition>> capabilitiesBeforeAssociate = capReqDefBeforeAssociate - .getCapabilities(); - Map<String, List<RequirementDefinition>> requirementsBeforeAssociate = capReqDefBeforeAssociate - .getRequirements(); String uidNotFound = "123"; RestResponse dissociateInstances = ComponentInstanceRestUtils.dissociateInstances(requirementDef, designerUser, @@ -1326,7 +1313,7 @@ public class ComponentRelationshipInVfTest extends ComponentBaseTest { Map<String, List<RequirementDefinition>> requirementsBeforeAssociate = capReqDefBeforeAssociate .getRequirements(); - RestResponse associateInstances = ComponentInstanceRestUtils.associateInstances(requirementDef, designerUser, + ComponentInstanceRestUtils.associateInstances(requirementDef, designerUser, resourceDetailsVF.getUniqueId(), ComponentTypeEnum.RESOURCE); RestResponse deleteResourceResponse = ResourceRestUtils.deleteResource(resourceDetailsCap.getUniqueId(), diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/CreateResourceApiTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/CreateResourceApiTest.java index f4e51b14d9..b2e81fea75 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/CreateResourceApiTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/CreateResourceApiTest.java @@ -23,7 +23,6 @@ package org.openecomp.sdc.ci.tests.execute.resource; import static org.openecomp.sdc.ci.tests.utils.rest.BaseRestUtils.STATUS_CODE_SUCCESS; import static org.testng.AssertJUnit.assertEquals; import static org.testng.AssertJUnit.assertNotNull; -import static org.testng.AssertJUnit.assertTrue; import java.util.ArrayList; import java.util.Arrays; @@ -31,18 +30,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.validation.constraints.AssertTrue; - -import org.apache.log4j.lf5.util.ResourceUtils; import org.junit.Rule; import org.junit.rules.TestName; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; -import org.openecomp.sdc.be.model.Component; import org.openecomp.sdc.be.model.LifecycleStateEnum; import org.openecomp.sdc.be.model.Resource; -import org.openecomp.sdc.be.model.Service; import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.ci.tests.api.ComponentBaseTest; import org.openecomp.sdc.ci.tests.api.Urls; @@ -52,7 +46,6 @@ import org.openecomp.sdc.ci.tests.datatypes.ComponentInstanceReqDetails; import org.openecomp.sdc.ci.tests.datatypes.ResourceReqDetails; import org.openecomp.sdc.ci.tests.datatypes.ResourceRespJavaObject; import org.openecomp.sdc.ci.tests.datatypes.ServiceReqDetails; -import org.openecomp.sdc.ci.tests.datatypes.enums.ArtifactTypeEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.ErrorInfo; import org.openecomp.sdc.ci.tests.datatypes.enums.LifeCycleStatesEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.NormativeTypesEnum; @@ -65,7 +58,6 @@ import org.openecomp.sdc.ci.tests.datatypes.http.HttpRequest; import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; import org.openecomp.sdc.ci.tests.utils.DbUtils; import org.openecomp.sdc.ci.tests.utils.Utils; -import org.openecomp.sdc.ci.tests.utils.general.AtomicOperationUtils; import org.openecomp.sdc.ci.tests.utils.general.Convertor; import org.openecomp.sdc.ci.tests.utils.general.ElementFactory; import org.openecomp.sdc.ci.tests.utils.rest.ArtifactRestUtils; @@ -78,7 +70,6 @@ import org.openecomp.sdc.ci.tests.utils.rest.ServiceRestUtils; import org.openecomp.sdc.ci.tests.utils.validation.AuditValidationUtils; import org.openecomp.sdc.ci.tests.utils.validation.ErrorValidationUtils; import org.openecomp.sdc.ci.tests.utils.validation.ResourceValidationUtils; -import org.openecomp.sdc.ci.tests.utils.validation.ServiceValidationUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.annotations.Test; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/GetAllResourceVersions.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/GetAllResourceVersions.java index 25c3242d2c..a3372098a0 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/GetAllResourceVersions.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/GetAllResourceVersions.java @@ -27,7 +27,6 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.Map; -import org.apache.log4j.lf5.util.ResourceUtils; import org.junit.rules.TestName; import org.openecomp.sdc.be.model.Resource; import org.openecomp.sdc.be.model.User; @@ -38,7 +37,6 @@ import org.openecomp.sdc.ci.tests.datatypes.enums.ResourceCategoryEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum; import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; import org.openecomp.sdc.ci.tests.utils.DbUtils; -import org.openecomp.sdc.ci.tests.utils.Utils; import org.openecomp.sdc.ci.tests.utils.general.ElementFactory; import org.openecomp.sdc.ci.tests.utils.rest.LifecycleRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ResourceRestUtils; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/GetLeftPaletteTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/GetLeftPaletteTest.java index 4ad008633a..b6d9058c92 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/GetLeftPaletteTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/GetLeftPaletteTest.java @@ -1,5 +1,10 @@ package org.openecomp.sdc.ci.tests.execute.resource; +import static org.testng.AssertJUnit.assertTrue; + +import java.io.IOException; +import java.util.Arrays; + import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.JSONValue; @@ -19,15 +24,10 @@ import org.openecomp.sdc.ci.tests.utils.rest.ResponseParser; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.AssertJUnit; -import org.testng.annotations.BeforeClass; import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import java.io.IOException; -import java.util.Arrays; - -import static org.testng.AssertJUnit.assertTrue; - /** * Created by chaya on 6/15/2017. */ diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/GetResourceNotAbstractApiTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/GetResourceNotAbstractApiTest.java index cdb7dc0304..cdfd3ec650 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/GetResourceNotAbstractApiTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/GetResourceNotAbstractApiTest.java @@ -30,7 +30,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.apache.log4j.lf5.util.ResourceUtils; import org.junit.Rule; import org.junit.rules.TestName; import org.openecomp.sdc.be.model.User; @@ -45,7 +44,6 @@ import org.openecomp.sdc.ci.tests.datatypes.http.HttpHeaderEnum; import org.openecomp.sdc.ci.tests.datatypes.http.HttpRequest; import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; import org.openecomp.sdc.ci.tests.execute.imports.ImportGenericResourceCITest; -import org.openecomp.sdc.ci.tests.utils.Utils; import org.openecomp.sdc.ci.tests.utils.general.ElementFactory; import org.openecomp.sdc.ci.tests.utils.rest.ResourceRestUtils; import org.slf4j.Logger; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/ResourceApiTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/ResourceApiTest.java index feb7b6f42e..df8ff58ba8 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/ResourceApiTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/ResourceApiTest.java @@ -33,7 +33,6 @@ import org.apache.http.client.methods.HttpGet; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.util.EntityUtils; -import org.apache.log4j.lf5.util.ResourceUtils; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.JSONValue; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/UpdateResourceMetadataTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/UpdateResourceMetadataTest.java index da5b469a4f..5b68b0fa84 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/UpdateResourceMetadataTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/UpdateResourceMetadataTest.java @@ -40,7 +40,6 @@ import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; import org.openecomp.sdc.be.model.LifecycleStateEnum; import org.openecomp.sdc.be.model.Resource; import org.openecomp.sdc.be.model.User; -import org.openecomp.sdc.be.model.category.CategoryDefinition; import org.openecomp.sdc.ci.tests.api.ComponentBaseTest; import org.openecomp.sdc.ci.tests.api.Urls; import org.openecomp.sdc.ci.tests.config.Config; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/VFResourceInstanceNameCRUD.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/VFResourceInstanceNameCRUD.java index 59050103ca..895390f764 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/VFResourceInstanceNameCRUD.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/VFResourceInstanceNameCRUD.java @@ -57,7 +57,6 @@ import org.openecomp.sdc.ci.tests.utils.rest.ResourceRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ResponseParser; import org.openecomp.sdc.ci.tests.utils.validation.ErrorValidationUtils; import org.testng.annotations.BeforeMethod; -import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; import com.google.gson.Gson; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/ValidateExtendedVfData.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/ValidateExtendedVfData.java index 8a17c3c115..37e7539fd9 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/ValidateExtendedVfData.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/ValidateExtendedVfData.java @@ -23,7 +23,6 @@ package org.openecomp.sdc.ci.tests.execute.resource; import static org.testng.AssertJUnit.assertNotNull; import static org.testng.AssertJUnit.assertTrue; -import java.io.IOException; import java.util.List; import org.json.simple.JSONArray; @@ -32,8 +31,6 @@ import org.json.simple.JSONValue; import org.junit.Rule; import org.junit.rules.TestName; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; -import org.openecomp.sdc.be.model.ArtifactDefinition; -import org.openecomp.sdc.be.model.Component; import org.openecomp.sdc.be.model.ComponentInstance; import org.openecomp.sdc.be.model.Resource; import org.openecomp.sdc.be.model.User; @@ -46,7 +43,6 @@ import org.openecomp.sdc.ci.tests.datatypes.enums.NormativeTypesEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.ResourceCategoryEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum; import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; -import org.openecomp.sdc.ci.tests.execute.lifecycle.LCSbaseTest; import org.openecomp.sdc.ci.tests.utils.general.AtomicOperationUtils; import org.openecomp.sdc.ci.tests.utils.general.ElementFactory; import org.openecomp.sdc.ci.tests.utils.rest.LifecycleRestUtils; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/VfComponentInstanceCRUDTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/VfComponentInstanceCRUDTest.java index ea8b89200e..dddab57873 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/VfComponentInstanceCRUDTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/resource/VfComponentInstanceCRUDTest.java @@ -40,10 +40,11 @@ import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; import org.openecomp.sdc.be.model.CapReqDef; import org.openecomp.sdc.be.model.CapabilityDefinition; +import org.openecomp.sdc.be.model.CapabilityRequirementRelationship; import org.openecomp.sdc.be.model.ComponentInstance; import org.openecomp.sdc.be.model.LifecycleStateEnum; import org.openecomp.sdc.be.model.RelationshipImpl; -import org.openecomp.sdc.be.model.RequirementAndRelationshipPair; +import org.openecomp.sdc.be.model.RelationshipInfo; import org.openecomp.sdc.be.model.RequirementCapabilityRelDef; import org.openecomp.sdc.be.model.RequirementDefinition; import org.openecomp.sdc.be.model.Resource; @@ -1686,7 +1687,7 @@ public class VfComponentInstanceCRUDTest extends ComponentInstanceBaseTest { requirementDef.setFromNode(riReq.getUniqueId()); requirementDef.setToNode(riCap.getUniqueId()); - RequirementAndRelationshipPair pair = new RequirementAndRelationshipPair(); + RelationshipInfo pair = new RelationshipInfo(); pair.setRequirementOwnerId(riReq.getUniqueId()); pair.setCapabilityOwnerId(riCap.getUniqueId()); pair.setRequirement("host"); @@ -1695,8 +1696,10 @@ public class VfComponentInstanceCRUDTest extends ComponentInstanceBaseTest { pair.setRelationships(relationship); pair.setCapabilityUid(capList.get(0).getUniqueId()); pair.setRequirementUid(reqList.get(0).getUniqueId()); - List<RequirementAndRelationshipPair> relationships = new ArrayList<>(); - relationships.add(pair); + List<CapabilityRequirementRelationship> relationships = new ArrayList<>(); + CapabilityRequirementRelationship capReqRel = new CapabilityRequirementRelationship(); + relationships.add(capReqRel); + capReqRel.setRelation(pair); requirementDef.setRelationships(relationships); RestResponse associateInstances = ComponentInstanceRestUtils.associateInstances(requirementDef, diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/ChangeServiceDistributionStatusApiTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/ChangeServiceDistributionStatusApiTest.java index 3d338534d1..c8a20cf44a 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/ChangeServiceDistributionStatusApiTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/ChangeServiceDistributionStatusApiTest.java @@ -32,7 +32,6 @@ import org.junit.Rule; import org.junit.rules.TestName; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; -import org.openecomp.sdc.be.model.ArtifactDefinition; import org.openecomp.sdc.be.model.Component; import org.openecomp.sdc.be.model.DistributionStatusEnum; import org.openecomp.sdc.be.model.LifecycleStateEnum; @@ -45,7 +44,6 @@ import org.openecomp.sdc.ci.tests.datatypes.ServiceReqDetails; import org.openecomp.sdc.ci.tests.datatypes.enums.ArtifactTypeEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.ErrorInfo; import org.openecomp.sdc.ci.tests.datatypes.enums.LifeCycleStatesEnum; -import org.openecomp.sdc.ci.tests.datatypes.enums.ServiceCategoriesEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum; import org.openecomp.sdc.ci.tests.datatypes.expected.ExpectedResourceAuditJavaObject; import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; @@ -61,8 +59,6 @@ import org.openecomp.sdc.ci.tests.utils.validation.ServiceValidationUtils; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; -import fj.data.Either; - public class ChangeServiceDistributionStatusApiTest extends ComponentBaseTest { protected ResourceReqDetails resourceDetails; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/CreateServiceMetadataApiTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/CreateServiceMetadataApiTest.java index 8e95a6d02c..56cfeb54ea 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/CreateServiceMetadataApiTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/CreateServiceMetadataApiTest.java @@ -20,7 +20,6 @@ package org.openecomp.sdc.ci.tests.execute.service; -import static org.openecomp.sdc.ci.tests.utils.rest.BaseRestUtils.STATUS_CODE_SUCCESS; import static org.testng.AssertJUnit.assertEquals; import static org.testng.AssertJUnit.assertNotNull; @@ -37,7 +36,6 @@ import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; import org.openecomp.sdc.be.model.Component; import org.openecomp.sdc.be.model.LifecycleStateEnum; -import org.openecomp.sdc.be.model.Resource; import org.openecomp.sdc.be.model.Service; import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.ci.tests.api.ComponentBaseTest; @@ -49,7 +47,6 @@ import org.openecomp.sdc.ci.tests.datatypes.ServiceReqDetails; import org.openecomp.sdc.ci.tests.datatypes.enums.ArtifactTypeEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.ErrorInfo; import org.openecomp.sdc.ci.tests.datatypes.enums.LifeCycleStatesEnum; -import org.openecomp.sdc.ci.tests.datatypes.enums.ServiceCategoriesEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum; import org.openecomp.sdc.ci.tests.datatypes.expected.ExpectedResourceAuditJavaObject; import org.openecomp.sdc.ci.tests.datatypes.http.HttpHeaderEnum; @@ -63,7 +60,6 @@ import org.openecomp.sdc.ci.tests.utils.rest.BaseRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ComponentInstanceRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.LifecycleRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ProductRestUtils; -import org.openecomp.sdc.ci.tests.utils.rest.ResourceRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ResponseParser; import org.openecomp.sdc.ci.tests.utils.rest.ServiceRestUtils; import org.openecomp.sdc.ci.tests.utils.validation.AuditValidationUtils; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/GetAllServiceVersions.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/GetAllServiceVersions.java index 3460cd6e04..760d002856 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/GetAllServiceVersions.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/GetAllServiceVersions.java @@ -28,7 +28,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.apache.cassandra.transport.Event.SchemaChange.Target; import org.junit.Rule; import org.junit.rules.TestName; import org.openecomp.sdc.be.dao.api.ActionStatus; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/GetComponentAuditApiTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/GetComponentAuditApiTest.java index 5642ce4745..846b5d24d3 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/GetComponentAuditApiTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/GetComponentAuditApiTest.java @@ -27,10 +27,8 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.stream.Collectors; import org.apache.http.HttpStatus; -import org.apache.log4j.lf5.util.ResourceUtils; import org.junit.Rule; import org.junit.rules.TestName; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; @@ -67,7 +65,6 @@ import org.testng.annotations.Test; import com.google.gson.JsonArray; import com.google.gson.JsonElement; -import com.google.gson.JsonObject; import fj.data.Either; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/GetServiceLatestVersionTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/GetServiceLatestVersionTest.java index 55ecf694ee..19bed4d380 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/GetServiceLatestVersionTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/GetServiceLatestVersionTest.java @@ -46,7 +46,6 @@ import org.openecomp.sdc.ci.tests.datatypes.enums.ResourceCategoryEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.ServiceCategoriesEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum; import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; -import org.openecomp.sdc.ci.tests.utils.Utils; import org.openecomp.sdc.ci.tests.utils.general.ElementFactory; import org.openecomp.sdc.ci.tests.utils.rest.ArtifactRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.LifecycleRestUtils; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/ReqCapOccurrencesTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/ReqCapOccurrencesTest.java index c21deafcd8..fdec8346fc 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/ReqCapOccurrencesTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/ReqCapOccurrencesTest.java @@ -39,10 +39,11 @@ import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; import org.openecomp.sdc.be.model.CapReqDef; import org.openecomp.sdc.be.model.CapabilityDefinition; +import org.openecomp.sdc.be.model.CapabilityRequirementRelationship; import org.openecomp.sdc.be.model.Component; import org.openecomp.sdc.be.model.ComponentInstance; import org.openecomp.sdc.be.model.RelationshipImpl; -import org.openecomp.sdc.be.model.RequirementAndRelationshipPair; +import org.openecomp.sdc.be.model.RelationshipInfo; import org.openecomp.sdc.be.model.RequirementCapabilityRelDef; import org.openecomp.sdc.be.model.RequirementDefinition; import org.openecomp.sdc.be.model.Resource; @@ -1045,7 +1046,7 @@ public class ReqCapOccurrencesTest extends ComponentInstanceBaseTest { requirementDef.setFromNode(riReq.getUniqueId()); requirementDef.setToNode(riCap.getUniqueId()); - RequirementAndRelationshipPair pair = new RequirementAndRelationshipPair(); + RelationshipInfo pair = new RelationshipInfo(); pair.setRequirementOwnerId(riReq.getUniqueId()); pair.setCapabilityOwnerId(riCap.getUniqueId()); pair.setRequirement("host"); @@ -1054,8 +1055,10 @@ public class ReqCapOccurrencesTest extends ComponentInstanceBaseTest { pair.setRelationships(relationship); pair.setCapabilityUid(capbilityUid); pair.setRequirementUid(requirementUid); - List<RequirementAndRelationshipPair> relationships = new ArrayList<>(); - relationships.add(pair); + List<CapabilityRequirementRelationship> relationships = new ArrayList<>(); + CapabilityRequirementRelationship capReqRel = new CapabilityRequirementRelationship(); + relationships.add(capReqRel); + capReqRel.setRelation(pair); requirementDef.setRelationships(relationships); return requirementDef; } diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/ServiceComponentInstanceCRUDTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/ServiceComponentInstanceCRUDTest.java index 2939a8a09e..ce2c996cc6 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/ServiceComponentInstanceCRUDTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/ServiceComponentInstanceCRUDTest.java @@ -34,9 +34,14 @@ import org.json.JSONArray; import org.junit.rules.TestName; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; -import org.openecomp.sdc.be.model.*; +import org.openecomp.sdc.be.model.CapReqDef; +import org.openecomp.sdc.be.model.CapabilityDefinition; +import org.openecomp.sdc.be.model.Component; +import org.openecomp.sdc.be.model.ComponentInstance; +import org.openecomp.sdc.be.model.RequirementCapabilityRelDef; +import org.openecomp.sdc.be.model.RequirementDefinition; +import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.ci.tests.api.ComponentInstanceBaseTest; -import org.openecomp.sdc.ci.tests.api.Urls; import org.openecomp.sdc.ci.tests.datatypes.ArtifactReqDetails; import org.openecomp.sdc.ci.tests.datatypes.ComponentInstanceReqDetails; import org.openecomp.sdc.ci.tests.datatypes.ComponentReqDetails; @@ -44,10 +49,8 @@ import org.openecomp.sdc.ci.tests.datatypes.ResourceReqDetails; import org.openecomp.sdc.ci.tests.datatypes.ServiceReqDetails; import org.openecomp.sdc.ci.tests.datatypes.enums.ArtifactTypeEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.LifeCycleStatesEnum; -import org.openecomp.sdc.ci.tests.datatypes.enums.ServiceCategoriesEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum; import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; -import org.openecomp.sdc.ci.tests.utils.Utils; import org.openecomp.sdc.ci.tests.utils.general.ElementFactory; import org.openecomp.sdc.ci.tests.utils.rest.ArtifactRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ComponentInstanceRestUtils; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/UpdateServiceMetadataTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/UpdateServiceMetadataTest.java index 1865dc3292..def34958eb 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/UpdateServiceMetadataTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/service/UpdateServiceMetadataTest.java @@ -45,7 +45,6 @@ import org.openecomp.sdc.ci.tests.datatypes.ResourceReqDetails; import org.openecomp.sdc.ci.tests.datatypes.ServiceReqDetails; import org.openecomp.sdc.ci.tests.datatypes.enums.ArtifactTypeEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.LifeCycleStatesEnum; -import org.openecomp.sdc.ci.tests.datatypes.enums.ResourceCategoryEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.ServiceCategoriesEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum; import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; @@ -523,6 +522,15 @@ public class UpdateServiceMetadataTest extends ComponentBaseTest { getServiceAndValidate(serviceDetails, LifecycleStateEnum.NOT_CERTIFIED_CHECKOUT); } + @Test + public void environmentContextService() throws Exception { + updatedServiceDetails.setEnvironmentContext("General_Revenue-Bearing"); + RestResponse updateServiceResponse = ServiceRestUtils.updateService(updatedServiceDetails, sdncDesignerDetails); + validateResponse(updateServiceResponse, 200, null, listForMessage); + Service actualService = ResponseParser.convertServiceResponseToJavaObject(updateServiceResponse.getResponse()); + assertEquals(updatedServiceDetails.getEnvironmentContext(), actualService.getEnvironmentContext()); + } + // TODO Irrelevant @Test(enabled = false) public void missingProjectCodeTest1() throws Exception { diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/user/GovernorWorkspaceApiTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/user/GovernorWorkspaceApiTest.java index 9a7f68264f..7d0ef75cf5 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/user/GovernorWorkspaceApiTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/execute/user/GovernorWorkspaceApiTest.java @@ -47,9 +47,7 @@ import org.openecomp.sdc.ci.tests.datatypes.enums.ArtifactTypeEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.LifeCycleStatesEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum; import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; -import org.openecomp.sdc.ci.tests.execute.lifecycle.LCSbaseTest; import org.openecomp.sdc.ci.tests.utils.DbUtils; -import org.openecomp.sdc.ci.tests.utils.Utils; import org.openecomp.sdc.ci.tests.utils.general.AtomicOperationUtils; import org.openecomp.sdc.ci.tests.utils.general.ElementFactory; import org.openecomp.sdc.ci.tests.utils.rest.ArtifactRestUtils; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/migration/v1707/CommonMigrationUtils.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/migration/v1707/CommonMigrationUtils.java index 41a4eb0f3b..809a51c2ff 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/migration/v1707/CommonMigrationUtils.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/migration/v1707/CommonMigrationUtils.java @@ -20,11 +20,11 @@ package org.openecomp.sdc.ci.tests.migration.v1707; -import com.thinkaurelius.titan.core.TitanGraph; - import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertNull; +import com.thinkaurelius.titan.core.TitanGraph; + public class CommonMigrationUtils { public static void assertKeyNotExist(TitanGraph graph, String key) { diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/migration/v1707/postupgrade/AttKeyPropertiesRenameTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/migration/v1707/postupgrade/AttKeyPropertiesRenameTest.java index 18ade957cf..4ae4c17bea 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/migration/v1707/postupgrade/AttKeyPropertiesRenameTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/migration/v1707/postupgrade/AttKeyPropertiesRenameTest.java @@ -20,7 +20,16 @@ package org.openecomp.sdc.ci.tests.migration.v1707.postupgrade; -import com.thinkaurelius.titan.core.TitanVertex; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.assertNull; +import static org.testng.Assert.assertTrue; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + import org.junit.Rule; import org.junit.rules.TestName; import org.openecomp.sdc.ci.tests.api.ComponentBaseTest; @@ -28,12 +37,7 @@ import org.openecomp.sdc.ci.tests.migration.v1707.CommonMigrationUtils; import org.openecomp.sdc.ci.tests.utils.graph.GraphFileUtils; import org.testng.annotations.Test; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import static org.testng.Assert.*; +import com.thinkaurelius.titan.core.TitanVertex; public class AttKeyPropertiesRenameTest extends ComponentBaseTest { diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/migration/v1707/preupgrade/AttKeyPropertiesBeforeRenameTest.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/migration/v1707/preupgrade/AttKeyPropertiesBeforeRenameTest.java index 81fe8b4acf..4369d75a74 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/migration/v1707/preupgrade/AttKeyPropertiesBeforeRenameTest.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/migration/v1707/preupgrade/AttKeyPropertiesBeforeRenameTest.java @@ -20,7 +20,10 @@ package org.openecomp.sdc.ci.tests.migration.v1707.preupgrade; -import com.thinkaurelius.titan.core.TitanVertex; +import static org.testng.Assert.assertTrue; + +import java.io.IOException; + import org.junit.Rule; import org.junit.rules.TestName; import org.openecomp.sdc.ci.tests.api.ComponentBaseTest; @@ -28,9 +31,7 @@ import org.openecomp.sdc.ci.tests.migration.v1707.CommonMigrationUtils; import org.openecomp.sdc.ci.tests.utils.graph.GraphFileUtils; import org.testng.annotations.Test; -import java.io.IOException; - -import static org.testng.Assert.assertTrue; +import com.thinkaurelius.titan.core.TitanVertex; public class AttKeyPropertiesBeforeRenameTest extends ComponentBaseTest { diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/sanity/MultipleResourceUpdate.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/sanity/MultipleResourceUpdate.java index 0a7b4a98aa..1cc4626f49 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/sanity/MultipleResourceUpdate.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/sanity/MultipleResourceUpdate.java @@ -20,14 +20,14 @@ package org.openecomp.sdc.ci.tests.sanity; +import static org.testng.AssertJUnit.assertTrue; + import java.util.ArrayList; import java.util.List; -import java.util.Map; import org.junit.Rule; import org.junit.rules.TestName; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; -import org.openecomp.sdc.be.model.Component; import org.openecomp.sdc.be.model.ComponentInstance; import org.openecomp.sdc.be.model.Resource; import org.openecomp.sdc.ci.tests.api.ComponentBaseTest; @@ -43,7 +43,6 @@ import org.openecomp.sdc.ci.tests.utils.general.ElementFactory; import org.openecomp.sdc.ci.tests.utils.rest.ComponentInstanceRestUtils; import org.openecomp.sdc.ci.tests.utils.rest.ProductRestUtils; import org.testng.annotations.Test; -import static org.testng.AssertJUnit.assertTrue; public class MultipleResourceUpdate extends ComponentBaseTest { diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/DbUtils.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/DbUtils.java index de7fd7eaf7..41aa1a567f 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/DbUtils.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/DbUtils.java @@ -29,7 +29,15 @@ import java.util.Map.Entry; import java.util.Set; import org.apache.tinkerpop.gremlin.structure.Edge; +import org.apache.tinkerpop.gremlin.structure.Element; import org.apache.tinkerpop.gremlin.structure.Vertex; +import org.apache.tinkerpop.gremlin.structure.util.ElementHelper; +import org.openecomp.sdc.ci.tests.api.Urls; +import org.openecomp.sdc.ci.tests.config.Config; +import org.openecomp.sdc.ci.tests.datatypes.http.HttpRequest; +import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; +import org.openecomp.sdc.ci.tests.users.UserAuditJavaObject; +import org.openecomp.sdc.ci.tests.utils.cassandra.CassandraUtils; import com.google.gson.Gson; import com.google.gson.JsonArray; @@ -43,19 +51,6 @@ import com.thinkaurelius.titan.core.TitanVertex; import fj.data.Either; -import org.apache.tinkerpop.gremlin.structure.Direction; -import org.apache.tinkerpop.gremlin.structure.Edge; -import org.apache.tinkerpop.gremlin.structure.Vertex; -import org.apache.tinkerpop.gremlin.structure.util.ElementHelper; -import org.openecomp.sdc.ci.tests.api.Urls; -import org.openecomp.sdc.ci.tests.config.Config; -import org.openecomp.sdc.ci.tests.datatypes.http.HttpRequest; -import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; -import org.openecomp.sdc.ci.tests.users.UserAuditJavaObject; -import org.openecomp.sdc.ci.tests.utils.cassandra.CassandraUtils; -import org.apache.tinkerpop.gremlin.structure.Element; -import org.apache.tinkerpop.gremlin.structure.Property; - public class DbUtils { private static String titanConfigFilePath; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/ReqCap.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/ReqCap.java index 66d2a8450c..66379f18ef 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/ReqCap.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/ReqCap.java @@ -42,7 +42,7 @@ import org.openecomp.sdc.be.model.CapabilityDefinition; import org.openecomp.sdc.be.model.Component; import org.openecomp.sdc.be.model.ComponentInstance; import org.openecomp.sdc.be.model.Product; -import org.openecomp.sdc.be.model.RequirementAndRelationshipPair; +import org.openecomp.sdc.be.model.RelationshipInfo; import org.openecomp.sdc.be.model.RequirementCapabilityRelDef; import org.openecomp.sdc.be.model.RequirementDefinition; import org.openecomp.sdc.be.model.Resource; @@ -580,7 +580,7 @@ public class ReqCap { private static void deleteAssociatedFromExpected(RequirementCapabilityRelDef requirementDef) { // removing from requirements - RequirementAndRelationshipPair relationship = requirementDef.getRelationships().get(0); + RelationshipInfo relationship = requirementDef.getRelationships().get(0).getRelation(); String type = relationship.getRelationship().getType(); String fromId = requirementDef.getFromNode(); List<RequirementDefinition> reqList = expectedContainerRequirements.get(type); @@ -612,7 +612,7 @@ public class ReqCap { private static void addDissociatedToExpected(RequirementCapabilityRelDef requirementDef) { // adding to requirements - RequirementAndRelationshipPair relationship = requirementDef.getRelationships().get(0); + RelationshipInfo relationship = requirementDef.getRelationships().get(0).getRelation(); String type = relationship.getRelationship().getType(); String fromId = requirementDef.getFromNode(); String key = type + " " + fromId; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/cassandra/CassandraUtils.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/cassandra/CassandraUtils.java index 832ebdf4b9..b6cc44ce36 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/cassandra/CassandraUtils.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/cassandra/CassandraUtils.java @@ -20,10 +20,10 @@ package org.openecomp.sdc.ci.tests.utils.cassandra; -import com.datastax.driver.core.*; -import com.datastax.driver.core.querybuilder.QueryBuilder; -import com.datastax.driver.core.querybuilder.Select; -import com.datastax.driver.core.querybuilder.Select.Where; +import java.io.FileNotFoundException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; import org.javatuples.Pair; import org.openecomp.sdc.be.resources.data.auditing.AuditingTypesConstants; @@ -32,10 +32,15 @@ import org.openecomp.sdc.common.datastructure.AuditingFieldsKeysEnum; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.FileNotFoundException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; +import com.datastax.driver.core.Cluster; +import com.datastax.driver.core.KeyspaceMetadata; +import com.datastax.driver.core.Metadata; +import com.datastax.driver.core.Row; +import com.datastax.driver.core.Session; +import com.datastax.driver.core.TableMetadata; +import com.datastax.driver.core.querybuilder.QueryBuilder; +import com.datastax.driver.core.querybuilder.Select; +import com.datastax.driver.core.querybuilder.Select.Where; public final class CassandraUtils { private static Logger logger = LoggerFactory.getLogger(CassandraUtils.class.getName()); diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/cassandra/CassandraUtils2.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/cassandra/CassandraUtils2.java index cafdab7d8f..05336c475b 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/cassandra/CassandraUtils2.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/cassandra/CassandraUtils2.java @@ -20,10 +20,10 @@ package org.openecomp.sdc.ci.tests.utils.cassandra; -import com.datastax.driver.core.*; -import com.datastax.driver.core.querybuilder.QueryBuilder; -import com.datastax.driver.core.querybuilder.Select; -import com.datastax.driver.core.querybuilder.Select.Where; +import java.io.FileNotFoundException; +import java.util.Collection; +import java.util.List; + import org.javatuples.Pair; import org.openecomp.sdc.be.resources.data.auditing.AuditingTypesConstants; import org.openecomp.sdc.ci.tests.utils.Utils; @@ -31,9 +31,15 @@ import org.openecomp.sdc.common.datastructure.AuditingFieldsKeysEnum; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.FileNotFoundException; -import java.util.Collection; -import java.util.List; +import com.datastax.driver.core.Cluster; +import com.datastax.driver.core.KeyspaceMetadata; +import com.datastax.driver.core.Metadata; +import com.datastax.driver.core.Row; +import com.datastax.driver.core.Session; +import com.datastax.driver.core.TableMetadata; +import com.datastax.driver.core.querybuilder.QueryBuilder; +import com.datastax.driver.core.querybuilder.Select; +import com.datastax.driver.core.querybuilder.Select.Where; public final class CassandraUtils2 { private static Logger logger = LoggerFactory.getLogger(CassandraUtils2.class.getName()); diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/general/Convertor.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/general/Convertor.java index 79dea07c44..a9b8aaea15 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/general/Convertor.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/general/Convertor.java @@ -29,7 +29,6 @@ import java.util.List; import org.apache.commons.lang3.StringUtils; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.model.DistributionStatusEnum; import org.openecomp.sdc.be.model.LifecycleStateEnum; import org.openecomp.sdc.be.model.Product; import org.openecomp.sdc.be.model.User; @@ -40,12 +39,10 @@ import org.openecomp.sdc.ci.tests.datatypes.ResourceReqDetails; import org.openecomp.sdc.ci.tests.datatypes.ResourceRespJavaObject; import org.openecomp.sdc.ci.tests.datatypes.ServiceReqDetails; import org.openecomp.sdc.ci.tests.datatypes.enums.ErrorInfo; -import org.openecomp.sdc.ci.tests.datatypes.enums.LifeCycleStatesEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum; import org.openecomp.sdc.ci.tests.datatypes.expected.ExpectedProductAudit; import org.openecomp.sdc.ci.tests.datatypes.expected.ExpectedResourceAuditJavaObject; import org.openecomp.sdc.ci.tests.datatypes.expected.ExpectedUserCRUDAudit; -import org.openecomp.sdc.ci.tests.utils.Utils; import org.openecomp.sdc.ci.tests.utils.validation.ErrorValidationUtils; import org.openecomp.sdc.common.api.Constants; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/general/ElementFactory.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/general/ElementFactory.java index 1578b6eba0..076261adef 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/general/ElementFactory.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/general/ElementFactory.java @@ -33,10 +33,11 @@ import org.openecomp.sdc.be.datatypes.enums.AssetTypeEnum; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; import org.openecomp.sdc.be.model.ArtifactDefinition; import org.openecomp.sdc.be.model.CapabilityDefinition; +import org.openecomp.sdc.be.model.CapabilityRequirementRelationship; import org.openecomp.sdc.be.model.Component; import org.openecomp.sdc.be.model.LifecycleStateEnum; import org.openecomp.sdc.be.model.RelationshipImpl; -import org.openecomp.sdc.be.model.RequirementAndRelationshipPair; +import org.openecomp.sdc.be.model.RelationshipInfo; import org.openecomp.sdc.be.model.RequirementCapabilityRelDef; import org.openecomp.sdc.be.model.RequirementDefinition; import org.openecomp.sdc.be.model.Resource; @@ -51,7 +52,6 @@ import org.openecomp.sdc.ci.tests.datatypes.ComponentReqDetails; import org.openecomp.sdc.ci.tests.datatypes.ImportReqDetails; import org.openecomp.sdc.ci.tests.datatypes.ProductReqDetails; import org.openecomp.sdc.ci.tests.datatypes.PropertyReqDetails; -import org.openecomp.sdc.ci.tests.datatypes.ResourceAssetStructure; import org.openecomp.sdc.ci.tests.datatypes.ResourceExternalReqDetails; import org.openecomp.sdc.ci.tests.datatypes.ResourceReqDetails; import org.openecomp.sdc.ci.tests.datatypes.ServiceReqDetails; @@ -71,8 +71,6 @@ import org.openecomp.sdc.ci.tests.utils.validation.ErrorValidationUtils; import org.openecomp.sdc.common.api.ArtifactGroupTypeEnum; import org.openecomp.sdc.common.util.ValidationUtils; -import com.google.common.base.CaseFormat; - public class ElementFactory { private static final String JH0003 = "jh0003"; @@ -915,7 +913,7 @@ public class ElementFactory { RequirementCapabilityRelDef requirementDef = new RequirementCapabilityRelDef(); requirementDef.setFromNode(fromCompInstId); requirementDef.setToNode(toCompInstId); - RequirementAndRelationshipPair pair = new RequirementAndRelationshipPair(); + RelationshipInfo pair = new RelationshipInfo(); pair.setRequirementOwnerId(reqOwnerId); pair.setCapabilityOwnerId(capOwnerId); pair.setRequirement(reqCapName); @@ -924,8 +922,10 @@ public class ElementFactory { pair.setRelationships(relationship); pair.setCapabilityUid(capList.get(0).getUniqueId()); pair.setRequirementUid(reqList.get(0).getUniqueId()); - List<RequirementAndRelationshipPair> relationships = new ArrayList<>(); - relationships.add(pair); + List<CapabilityRequirementRelationship> relationships = new ArrayList<>(); + CapabilityRequirementRelationship capReqRel = new CapabilityRequirementRelationship(); + relationships.add(capReqRel); + capReqRel.setRelation(pair); requirementDef.setRelationships(relationships); return requirementDef; } diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/general/ImportUtils.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/general/ImportUtils.java index c1f311a91e..7e5a7d69a2 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/general/ImportUtils.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/general/ImportUtils.java @@ -20,16 +20,10 @@ package org.openecomp.sdc.ci.tests.utils.general; -import java.io.File; import java.io.IOException; import java.util.List; -import org.openecomp.sdc.be.model.User; -import org.openecomp.sdc.ci.tests.config.Config; import org.openecomp.sdc.ci.tests.datatypes.ImportReqDetails; -import org.openecomp.sdc.ci.tests.datatypes.ResourceReqDetails; -import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum; -import org.openecomp.sdc.ci.tests.utils.Utils; public class ImportUtils { diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/graph/GraphFileUtils.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/graph/GraphFileUtils.java index 91e7a3fae9..00c51f8fbd 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/graph/GraphFileUtils.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/graph/GraphFileUtils.java @@ -20,10 +20,6 @@ package org.openecomp.sdc.ci.tests.utils.graph; -import com.thinkaurelius.titan.core.TitanVertex; -import org.apache.commons.io.FileUtils; -import org.openecomp.sdc.be.dao.neo4j.GraphPropertiesDictionary; - import java.io.IOException; import java.nio.charset.Charset; import java.nio.file.Files; @@ -32,6 +28,11 @@ import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; +import org.apache.commons.io.FileUtils; +import org.openecomp.sdc.be.dao.neo4j.GraphPropertiesDictionary; + +import com.thinkaurelius.titan.core.TitanVertex; + public class GraphFileUtils { public static final String TEMP_FILES_PATH = "src/main/resources/ci/tempFiles/%s.txt"; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/AssetRestUtils.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/AssetRestUtils.java index 5565780dd5..7cee913b0d 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/AssetRestUtils.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/AssetRestUtils.java @@ -24,7 +24,6 @@ import static org.testng.AssertJUnit.assertNotNull; import static org.testng.AssertJUnit.assertTrue; import java.io.IOException; -import java.net.URLEncoder; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -44,7 +43,6 @@ import org.openecomp.sdc.be.model.Component; import org.openecomp.sdc.be.model.ComponentInstance; import org.openecomp.sdc.be.model.Resource; import org.openecomp.sdc.be.model.Service; -import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.ci.tests.api.Urls; import org.openecomp.sdc.ci.tests.config.Config; import org.openecomp.sdc.ci.tests.datatypes.ArtifactAssetStructure; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/CatalogRestUtils.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/CatalogRestUtils.java index 522a91f7d3..528e82a9f5 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/CatalogRestUtils.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/CatalogRestUtils.java @@ -21,7 +21,11 @@ package org.openecomp.sdc.ci.tests.utils.rest; import java.io.IOException; -import java.util.*; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; import org.openecomp.sdc.ci.tests.api.Urls; import org.openecomp.sdc.ci.tests.config.Config; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/CommonRestUtils.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/CommonRestUtils.java index bc807df7fa..e691efdbca 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/CommonRestUtils.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/CommonRestUtils.java @@ -2,12 +2,11 @@ package org.openecomp.sdc.ci.tests.utils.rest; import org.openecomp.sdc.ci.tests.api.Urls; import org.openecomp.sdc.ci.tests.config.Config; +import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; import org.openecomp.sdc.ci.tests.utils.Utils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; - public class CommonRestUtils extends BaseRestUtils { private static Logger logger = LoggerFactory.getLogger(CommonRestUtils.class.getName()); diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ImportRestUtils.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ImportRestUtils.java index 9755ff2d91..407141622e 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ImportRestUtils.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ImportRestUtils.java @@ -34,7 +34,6 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Properties; import org.apache.commons.io.IOUtils; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ProductRestUtils.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ProductRestUtils.java index ebc80ae537..fad47f0178 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ProductRestUtils.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ProductRestUtils.java @@ -22,8 +22,6 @@ package org.openecomp.sdc.ci.tests.utils.rest; import java.io.IOException; -import com.google.gson.Gson; - import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.model.LifecycleStateEnum; import org.openecomp.sdc.be.model.Product; @@ -39,6 +37,8 @@ import org.openecomp.sdc.ci.tests.utils.general.ElementFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.google.gson.Gson; + public class ProductRestUtils extends BaseRestUtils { private static Gson gson = new Gson(); private static Logger logger = LoggerFactory.getLogger(ProductRestUtils.class.getName()); diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ResourceRestUtils.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ResourceRestUtils.java index a47477f363..0d8a1119ad 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ResourceRestUtils.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ResourceRestUtils.java @@ -59,13 +59,13 @@ import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; import org.openecomp.sdc.ci.tests.utils.Utils; import org.openecomp.sdc.ci.tests.utils.general.ElementFactory; import org.openecomp.sdc.common.util.GeneralUtility; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonParser; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; public class ResourceRestUtils extends BaseRestUtils { diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ResourceRestUtilsExternalAPI.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ResourceRestUtilsExternalAPI.java index 19d7d728fe..d9b8ec3d4b 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ResourceRestUtilsExternalAPI.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ResourceRestUtilsExternalAPI.java @@ -26,7 +26,6 @@ import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.ci.tests.api.Urls; import org.openecomp.sdc.ci.tests.config.Config; import org.openecomp.sdc.ci.tests.datatypes.ResourceExternalReqDetails; -import org.openecomp.sdc.ci.tests.datatypes.ResourceReqDetails; import org.openecomp.sdc.ci.tests.datatypes.http.HttpHeaderEnum; import org.openecomp.sdc.ci.tests.datatypes.http.HttpRequest; import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ResponseParser.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ResponseParser.java index 6ffb2b29b5..2d173cc151 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ResponseParser.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ResponseParser.java @@ -31,10 +31,8 @@ import java.util.Map; import org.apache.commons.codec.binary.Base64; import org.apache.log4j.Logger; -import org.codehaus.jackson.JsonParseException; import org.codehaus.jackson.Version; import org.codehaus.jackson.map.JsonDeserializer; -import org.codehaus.jackson.map.JsonMappingException; import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jackson.map.module.SimpleModule; import org.json.JSONArray; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/ArtifactValidationUtils.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/ArtifactValidationUtils.java index f3240684cb..50ecdd8520 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/ArtifactValidationUtils.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/ArtifactValidationUtils.java @@ -44,9 +44,7 @@ import org.openecomp.sdc.ci.tests.utils.Utils; import org.openecomp.sdc.ci.tests.utils.general.FileUtils; import org.openecomp.sdc.common.api.ArtifactGroupTypeEnum; -import com.google.gson.Gson; import com.google.gson.JsonElement; -import com.google.gson.JsonObject; import com.google.gson.JsonParser; public class ArtifactValidationUtils { diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/BaseValidationUtils.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/BaseValidationUtils.java index 0d49d97302..eb3ee331ed 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/BaseValidationUtils.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/BaseValidationUtils.java @@ -28,7 +28,6 @@ import java.util.Arrays; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.ci.tests.datatypes.enums.ErrorInfo; import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; -import org.openecomp.sdc.ci.tests.utils.Utils; import org.openecomp.sdc.ci.tests.utils.rest.ResponseParser; import org.openecomp.sdc.exception.ResponseFormat; import org.testng.Assert; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/CategoryValidationUtils.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/CategoryValidationUtils.java index d63a514b3a..cd2297fd19 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/CategoryValidationUtils.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/CategoryValidationUtils.java @@ -20,9 +20,10 @@ package org.openecomp.sdc.ci.tests.utils.validation; +import static org.testng.AssertJUnit.assertEquals; import static org.testng.AssertJUnit.assertNotNull; import static org.testng.AssertJUnit.assertTrue; -import static org.testng.AssertJUnit.assertEquals; + import org.json.JSONObject; import org.openecomp.sdc.be.model.category.CategoryDefinition; import org.openecomp.sdc.be.model.category.GroupingDefinition; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/ErrorValidationUtils.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/ErrorValidationUtils.java index 94dcca7edf..9bf8bd9230 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/ErrorValidationUtils.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/ErrorValidationUtils.java @@ -29,7 +29,6 @@ import java.io.InputStream; import java.util.List; import java.util.Map; -import org.yaml.snakeyaml.Yaml; import org.codehaus.jettison.json.JSONException; import org.codehaus.jettison.json.JSONObject; import org.openecomp.sdc.ci.tests.config.Config; @@ -38,6 +37,7 @@ import org.openecomp.sdc.ci.tests.datatypes.enums.ExceptionEnumType; import org.openecomp.sdc.ci.tests.utils.Utils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.yaml.snakeyaml.Yaml; public class ErrorValidationUtils { diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/ServiceValidationUtils.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/ServiceValidationUtils.java index a7c7b7d34e..2f8a0dffc4 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/ServiceValidationUtils.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/ServiceValidationUtils.java @@ -20,8 +20,9 @@ package org.openecomp.sdc.ci.tests.utils.validation; -import static org.testng.AssertJUnit.assertFalse; import static org.testng.AssertJUnit.assertEquals; +import static org.testng.AssertJUnit.assertFalse; + import java.util.LinkedHashSet; import java.util.List; import java.util.Set; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/TestYamlParser.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/TestYamlParser.java index 223bf4ed4b..dde27d5cbd 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/TestYamlParser.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/TestYamlParser.java @@ -31,9 +31,7 @@ import java.util.Set; import org.junit.Rule; import org.junit.rules.TestName; -import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.ci.tests.api.ComponentBaseTest; -import org.openecomp.sdc.ci.tests.tosca.datatypes.ToscaDefinition; import org.openecomp.sdc.common.util.ZipUtil; import org.testng.annotations.Test; import org.yaml.snakeyaml.Yaml; diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/UserValidationUtils.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/UserValidationUtils.java index 9c44aa55ef..31e2327e40 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/UserValidationUtils.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/UserValidationUtils.java @@ -20,8 +20,8 @@ package org.openecomp.sdc.ci.tests.utils.validation; -import static org.testng.AssertJUnit.assertTrue; import static org.testng.AssertJUnit.assertEquals; +import static org.testng.AssertJUnit.assertTrue; import java.util.List; |