aboutsummaryrefslogtreecommitdiffstats
path: root/vid-automation
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2018-12-31 17:21:27 +0200
committerIttay Stern <ittay.stern@att.com>2019-01-09 20:19:55 +0200
commit6ad41e3ccd398a2721f41ad61c80b7bb03f7d127 (patch)
tree3bd672dff83e3218232cd8665680416b7fc26a5d /vid-automation
parent5ec29ff5e3864f1ba6ecac71f8bffbefa400cf27 (diff)
Merge from ECOMP's repository
Main Features -------------- - Async-Instantiation jobs mechanism major update; still WIP (package `org.onap.vid.job`) - New features in View/Edit: Activate fabric configuration; show related networks; soft delete - Support AAI service-tree traversal (`AAIServiceTree`) - In-memory cache for SDC models and certain A&AI queries (`CacheProviderWithLoadingCache`) - Upgrade TOSCA Parser and add parsing options; fix malformed TOSCA models - Resolve Cloud-Owner values for MSO - Pass X-ONAP headers to MSO Infrastructure -------------- - Remove codehaus' jackson mapper; use soley fasterxml 2.9.7 - Surefire invokes both TestNG and JUnit tests - Support Kotlin source files - AaiController2 which handles errors in a "Spring manner" - Inline generated-sources and remove jsonschema2pojo Quality -------- - Cumulative bug fixes (A&AI API, UI timeouts, and many more) - Many Sonar issues cleaned-up - Some unused classes removed - Minor changes in vid-automation project, allowing some API verification to run Hard Merges ------------ - HTTP Clients (MSO, A&AI, WebConfig, OutgoingRequestHeadersTest) - Moved `package org.onap.vid.controllers` to `controller`, without plural -- just to keep semantic sync with ECOMP. Reference commit in ECOMP: 3d1141625 Issue-ID: VID-378 Change-Id: I9c8d1e74caa41815891d441fc0760bb5f29c5788 Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-automation')
-rw-r--r--vid-automation/TestNg-ApiTest.xml2
-rw-r--r--vid-automation/TestNg-UI-half.xml15
-rw-r--r--vid-automation/TestNg-dev.xml (renamed from vid-automation/TestNg.xml)14
-rw-r--r--vid-automation/conf/services2
-rw-r--r--vid-automation/conf/users4
-rw-r--r--vid-automation/pom.xml11
-rw-r--r--vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOServiceInstanceGen2WithNames.java2
-rw-r--r--vid-automation/src/main/java/vid/automation/test/services/UsersService.java2
-rw-r--r--vid-automation/src/main/java/vid/automation/test/test/VidBaseTestCase.java19
-rw-r--r--vid-automation/src/main/java/vid/automation/test/test/ViewEditServiceInstanceTest.java3
-rw-r--r--vid-automation/src/main/java/vid/automation/test/utils/DB_CONFIG.java2
-rw-r--r--vid-automation/src/main/resources/META-INF/aop-ajc.xml16
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationApiTest.java11
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/BaseApiAaiTest.java2
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/BaseApiTest.java9
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/BaseMsoApiTest.java4
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/ChangeManagementApiTest.java4
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/OperationalEnvironmentControllerApiTest.java2
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/ProbeApiTest.java7
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/SampleApiTest.java2
-rw-r--r--vid-automation/src/test/java/org/onap/vid/model/probe/ExternalComponentStatus.java2
-rw-r--r--vid-automation/src/test/java/org/onap/vid/more/LoggerFormatTest.java2
-rw-r--r--vid-automation/src/test/java/org/onap/vid/more/RequestIdFilterInstalled.java4
-rw-r--r--vid-automation/src/test/resources/test_config.properties4
24 files changed, 55 insertions, 90 deletions
diff --git a/vid-automation/TestNg-ApiTest.xml b/vid-automation/TestNg-ApiTest.xml
index e987f1604..440fed441 100644
--- a/vid-automation/TestNg-ApiTest.xml
+++ b/vid-automation/TestNg-ApiTest.xml
@@ -23,7 +23,7 @@
</run>
</groups>
<packages>
- <package name="org.opencomp.vid.*"/>
+ <package name="org.onap.vid.*"/>
</packages>
</test>
</suite> \ No newline at end of file
diff --git a/vid-automation/TestNg-UI-half.xml b/vid-automation/TestNg-UI-half.xml
index 025bd3f7d..bc51c9fce 100644
--- a/vid-automation/TestNg-UI-half.xml
+++ b/vid-automation/TestNg-UI-half.xml
@@ -18,18 +18,21 @@
};
String [] classes2 = new String [] {
"vid.automation.test.test.AddNetworkTest",
- "vid.automation.test.test.ALaCarteflowTest",
- "vid.automation.test.test.AssociatePnfTest",
"vid.automation.test.test.BrowseASDCTest",
"vid.automation.test.test.ChangeManagementTest",
- "vid.automation.test.test.CreateNewInstanceTest",
- "vid.automation.test.test.CreatePortMirroringConfigurationTest"
+ "vid.automation.test.test.ALaCarteflowTest",
+ "vid.automation.test.test.VlanTagSubInterfaceTest",
+ "vid.automation.test.test.CreateNewInstanceTest"
};
+
String [] classes3 = new String [] {
- "vid.automation.test.test.DrawingBoardTest"
+ "vid.automation.test.test.NewServiceInstanceTest",
+ "vid.automation.test.test.CreatePortMirroringConfigurationTest"
};
+
String [] classes4 = new String [] {
- "vid.automation.test.test.NewServiceInstanceTest"
+ "vid.automation.test.test.DrawingBoardTest",
+ "vid.automation.test.test.ViewEditServiceInstanceTest"
};
int selectPart = 0;
diff --git a/vid-automation/TestNg.xml b/vid-automation/TestNg-dev.xml
index a9eac97a6..b8bc84f96 100644
--- a/vid-automation/TestNg.xml
+++ b/vid-automation/TestNg-dev.xml
@@ -1,5 +1,7 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<!-- This file is only for dev propose and has no meaning in pipeline -->
+
<suite verbose="1" name="VID UI Tests" annotations="JDK">
<listeners>
<listener class-name="vid.automation.test.infra.FeatureTogglingTestngTransformer"/>
@@ -22,14 +24,18 @@
<!-- angular2 is not supported in CI yet. These tests can run only on
developers environment -->
<exclude name="Angular2Tests"/>
-
<!-- tests and features that are still under development but are pushed to develop -->
<exclude name="underDevelopment"/>
</run>
</groups>
- <packages>
- <package name="vid.automation.test.test.*"/>
- </packages>
+ <!--<packages>-->
+ <!--<package name="vid.automation.test.test.*"/>-->
+ <!--</packages>-->
+
+ <classes>
+ <!-- in order to test specific test class replace the following class name-->
+ <class name="vid.automation.test.test.NewServiceInstanceTest"/>
+ </classes>
</test>
</suite> \ No newline at end of file
diff --git a/vid-automation/conf/services b/vid-automation/conf/services
index c67a36626..85e0552f6 100644
--- a/vid-automation/conf/services
+++ b/vid-automation/conf/services
@@ -43,7 +43,7 @@
"1a80c596-27e5-4ca9-b5bb-e03a7fd4c0fd": {
"type" : "pnf",
"uuid": "1a80c596-27e5-4ca9-b5bb-e03a7fd4c0fd",
- "invariantUuid": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
+ "invariantUuid": "cdb90b57-ed78-4d44-a5b4-7f43a02ec632",
"name": "action-data",
"version": "1.0",
"category": "Network L1-3",
diff --git a/vid-automation/conf/users b/vid-automation/conf/users
index e6d3c6ac3..e2bc05a85 100644
--- a/vid-automation/conf/users
+++ b/vid-automation/conf/users
@@ -13,9 +13,9 @@
"userId": "1",
"password": "1"
},
- "roles": ["USP VOICE___VIRTUAL USP", "MSO_1610_ST___MSO-dev-service-type", "MSO_1610_ST___VIRTUAL USP"],
+ "roles": ["USP VOICE___VIRTUAL USP", "USP VOICE___HOSTED COMMUNICATIONS", "MSO_1610_ST___HOSTED COMMUNICATIONS", "MSO_1610_ST___MSO-dev-service-type", "MSO_1610_ST___VIRTUAL USP"],
"subscriberNames": ["USP VOICE", "MSO_1610_ST"],
- "serviceTypes": ["VIRTUAL USP", "MSO-dev-service-type"],
+ "serviceTypes": ["VIRTUAL USP", "HOSTED COMMUNICATIONS", "MSO-dev-service-type"],
"tenants": ["092eb9e8e4b7412e8787dd091bc58e86"]
},
"mobilityMobility": {
diff --git a/vid-automation/pom.xml b/vid-automation/pom.xml
index f8bd6460b..dfd61aae2 100644
--- a/vid-automation/pom.xml
+++ b/vid-automation/pom.xml
@@ -6,19 +6,18 @@
<artifactId>automationTest</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
- <springframework.version>4.2.0.RELEASE</springframework.version>
+ <springframework.version>4.2.9.RELEASE</springframework.version>
<jersey.version>2.23.1</jersey.version>
<jackson.version>2.6.3</jackson.version>
<aspectj.version>1.8.10</aspectj.version>
</properties>
-
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
-
+ <version>23.0</version>
</dependency>
<dependency>
<groupId>org.openecomp.sdc</groupId>
@@ -32,11 +31,11 @@
</exclusion>
</exclusions>
</dependency>
-<!-- <dependency>
+ <dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
- <version>1.2.12</version>
- </dependency> -->
+ <version>1.2.17</version>
+ </dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOServiceInstanceGen2WithNames.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOServiceInstanceGen2WithNames.java
index 52c3071fa..98187b9a2 100644
--- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOServiceInstanceGen2WithNames.java
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOServiceInstanceGen2WithNames.java
@@ -45,7 +45,7 @@ public abstract class PresetMSOServiceInstanceGen2WithNames extends PresetMSOBas
" \"productFamilyId\": \"myProductFamilyId\"," +
" \"source\": \"VID\"," +
" \"suppressRollback\": false," +
- " \"requestorId\": \"ab2222\"" +
+ " \"requestorId\": \"vid1\"" +
" }," +
" \"requestParameters\": {" +
" \"subscriptionServiceType\": \"mySubType\"," +
diff --git a/vid-automation/src/main/java/vid/automation/test/services/UsersService.java b/vid-automation/src/main/java/vid/automation/test/services/UsersService.java
index 282be9067..ac8af4511 100644
--- a/vid-automation/src/main/java/vid/automation/test/services/UsersService.java
+++ b/vid-automation/src/main/java/vid/automation/test/services/UsersService.java
@@ -1,6 +1,5 @@
package vid.automation.test.services;
-import com.att.automation.common.report_portal_integration.annotations.Step;
import com.google.common.primitives.Ints;
import org.apache.commons.lang3.StringUtils;
import vid.automation.test.model.User;
@@ -38,7 +37,6 @@ public class UsersService {
return usersObject.users;
}
- @Step("${method} with id: ${userId}")
public User getUser(String userId) {
User res = users.get(userId);
System.out.println("getUser userId='" + userId + "' returned: " + res);
diff --git a/vid-automation/src/main/java/vid/automation/test/test/VidBaseTestCase.java b/vid-automation/src/main/java/vid/automation/test/test/VidBaseTestCase.java
index 5c0206c06..e5a8b5786 100644
--- a/vid-automation/src/main/java/vid/automation/test/test/VidBaseTestCase.java
+++ b/vid-automation/src/main/java/vid/automation/test/test/VidBaseTestCase.java
@@ -1,23 +1,11 @@
package vid.automation.test.test;
-import com.att.automation.common.report_portal_integration.annotations.Step;
-import com.att.automation.common.report_portal_integration.listeners.ReportPortalListener;
-import com.att.automation.common.report_portal_integration.screenshots.WebDriverScreenshotsProvider;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.collect.ImmutableList;
import org.apache.commons.lang3.StringUtils;
import org.junit.Assert;
import org.onap.simulator.presetGenerator.presets.BasePresets.BasePreset;
-import org.onap.simulator.presetGenerator.presets.aai.PresetAAICloudRegionAndSourceFromConfigurationPut;
-import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetNetworkZones;
-import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetPortMirroringSourcePorts;
-import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetServicesGet;
-import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubDetailsGet;
-import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubscribersGet;
-import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetTenants;
-import org.onap.simulator.presetGenerator.presets.aai.PresetAAIPostNamedQueryForViewEdit;
-import org.onap.simulator.presetGenerator.presets.aai.PresetAAISearchNodeQueryEmptyResult;
-import org.onap.simulator.presetGenerator.presets.aai.PresetAAIServiceDesignAndCreationPut;
+import org.onap.simulator.presetGenerator.presets.aai.*;
import org.onap.simulator.presetGenerator.presets.ecompportal_att.PresetGetSessionSlotCheckIntervalGet;
import org.onap.simulator.presetGenerator.presets.mso.PresetMSOCreateServiceInstanceGen2;
import org.onap.simulator.presetGenerator.presets.mso.PresetMSOCreateServiceInstancePost;
@@ -34,7 +22,6 @@ import org.openqa.selenium.WebElement;
import org.testng.ITestContext;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.BeforeSuite;
-import org.testng.annotations.Listeners;
import org.testng.annotations.Test;
import vid.automation.test.Constants;
import vid.automation.test.infra.*;
@@ -60,7 +47,6 @@ import static org.hamcrest.core.Is.is;
import static org.testng.Assert.assertEquals;
import static org.testng.AssertJUnit.fail;
-@Listeners(com.att.automation.common.report_portal_integration.listeners.ReportPortalListener.class)
public class VidBaseTestCase extends SetupCDTest{
protected final UsersService usersService = new UsersService();
@@ -109,7 +95,7 @@ public class VidBaseTestCase extends SetupCDTest{
@BeforeSuite(alwaysRun = true)
public void screenShotsForReportPortal(){
try {
- ReportPortalListener.setScreenShotsProvider(new WebDriverScreenshotsProvider(getDriver()));
+ //ReportPortalListener.setScreenShotsProvider(new WebDriverScreenshotsProvider(getDriver()));
System.out.println("Called to ReportPortalListener to set ScreenShotsProvider");
} catch (Exception e) {
e.printStackTrace();
@@ -301,7 +287,6 @@ public class VidBaseTestCase extends SetupCDTest{
Assert.assertTrue(Constants.ViewEdit.VF_MODULE_CREATION_FAILED_MESSAGE, byText);
}
- @Step("${method}: ${instanceUUID}")
void goToExistingInstanceById(String instanceUUID) {
SearchExistingPage searchExistingPage = searchExistingInstanceById(instanceUUID);
assertViewEditButtonState( Constants.VIEW_EDIT_BUTTON_TEXT, instanceUUID);
diff --git a/vid-automation/src/main/java/vid/automation/test/test/ViewEditServiceInstanceTest.java b/vid-automation/src/main/java/vid/automation/test/test/ViewEditServiceInstanceTest.java
index e07acc3ac..3b9546fdd 100644
--- a/vid-automation/src/main/java/vid/automation/test/test/ViewEditServiceInstanceTest.java
+++ b/vid-automation/src/main/java/vid/automation/test/test/ViewEditServiceInstanceTest.java
@@ -28,7 +28,6 @@ import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import static org.apache.logging.log4j.core.util.Assert.isNonEmpty;
import static org.hamcrest.Matchers.equalTo;
import static org.testng.AssertJUnit.assertEquals;
import static vid.automation.test.infra.Features.FLAG_COLLECTION_RESOURCE_SUPPORT;
@@ -359,7 +358,7 @@ public class ViewEditServiceInstanceTest extends VidBaseTestCase {
"pending-delete", false);
for(Map.Entry<String, Boolean> entry: vfModulesStatuses.entrySet()) {
WebElement vfModule = GeneralUIUtils.getWebElementByClassName("vfModuleTreeNode-" + entry.getKey());
- Assert.assertEquals(isNonEmpty(vfModule.findElements(By.className("resume"))), entry.getValue());
+ Assert.assertEquals(!vfModule.findElements(By.className("resume")).isEmpty(), entry.getValue());
}
}
diff --git a/vid-automation/src/main/java/vid/automation/test/utils/DB_CONFIG.java b/vid-automation/src/main/java/vid/automation/test/utils/DB_CONFIG.java
index 18cda6bda..ef5625232 100644
--- a/vid-automation/src/main/java/vid/automation/test/utils/DB_CONFIG.java
+++ b/vid-automation/src/main/java/vid/automation/test/utils/DB_CONFIG.java
@@ -1,7 +1,7 @@
package vid.automation.test.utils;
public class DB_CONFIG {
- public static String url = String.format("jdbc:mariadb://%s:%d/vid_portal",
+ public static String url = String.format("jdbc:mariadb://%s:%d/vid_openecomp_epsdk",
System.getProperty("DB_HOST", System.getProperty("VID_HOST", "127.0.0.1" )),
Integer.valueOf(System.getProperty("DB_PORT", "3306"))
);
diff --git a/vid-automation/src/main/resources/META-INF/aop-ajc.xml b/vid-automation/src/main/resources/META-INF/aop-ajc.xml
index 7376e3291..77505c753 100644
--- a/vid-automation/src/main/resources/META-INF/aop-ajc.xml
+++ b/vid-automation/src/main/resources/META-INF/aop-ajc.xml
@@ -1,18 +1,2 @@
<aspectj>
- <aspects>
- <aspect name="com.att.automation.common.report_portal_integration.aspects.StepAspects"/>
- <aspect name="com.att.automation.common.report_portal_integration.aspects.WebDriverAspects"/>
- <aspect name="com.att.automation.common.report_portal_integration.aspects.AssertAspects"/>
- <aspect name="com.att.automation.common.report_portal_integration.aspects.WireMockAspects"/>
- <aspect name="com.att.automation.common.report_portal_integration.aspects.RestAssuredAspects"/>
- <aspect name="com.att.automation.common.report_portal_integration.aspects.ReportPortalAspects"/>
- <aspect name="com.att.automation.common.report_portal_integration.aspects.LatticeAspects"/>
- </aspects>
- <weaver options="-Xset:weaveJavaxPackages=true -warn:none -Xlint:ignore">
- <include within="vid.automation..*"/>
- <include within="org.onap..*"/>
- <include within="com.att.automation..*"/>
- <include within="com.epam..*"/>
- <include within="org.testng.TestNG"/>
- </weaver>
</aspectj> \ No newline at end of file
diff --git a/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationApiTest.java
index 1a0e1c9b7..a5b72c261 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationApiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationApiTest.java
@@ -13,11 +13,7 @@ import org.onap.simulator.presetGenerator.presets.BasePresets.BasePreset;
import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubscribersGet;
import org.onap.simulator.presetGenerator.presets.aai.PresetAAISearchNodeQueryEmptyResult;
import org.onap.simulator.presetGenerator.presets.ecompportal_att.PresetGetSessionSlotCheckIntervalGet;
-import org.onap.simulator.presetGenerator.presets.mso.PresetMSOAssignServiceInstanceGen2WithNames;
-import org.onap.simulator.presetGenerator.presets.mso.PresetMSOCreateServiceInstanceGen2WithNames;
-import org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestGet;
-import org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestGetErrorResponse;
-import org.onap.simulator.presetGenerator.presets.mso.PresetMSOServiceInstanceGen2ErrorResponse;
+import org.onap.simulator.presetGenerator.presets.mso.*;
import org.onap.vid.model.asyncInstantiation.JobAuditStatus;
import org.onap.vid.model.asyncInstantiation.ServiceInfo;
import org.onap.vid.model.mso.MsoResponseWrapper2;
@@ -25,7 +21,6 @@ import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.client.HttpClientErrorException;
-
import org.springframework.web.client.RestTemplate;
import org.testng.Assert;
import org.testng.annotations.DataProvider;
@@ -35,8 +30,8 @@ import vid.automation.test.infra.Features;
import vid.automation.test.infra.Wait;
import vid.automation.test.model.JobStatus;
import vid.automation.test.services.SimulatorApi;
-import java.util.*;
+import java.util.*;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
@@ -400,7 +395,7 @@ public class AsyncInstantiationApiTest extends BaseMsoApiTest {
List<String> jobIds = createBulkOfInstances(presets, isPause, bulkSize, names);
Assert.assertEquals(jobIds.size(),bulkSize);
for(String jobId: jobIds) {
- ServiceInfo expectedServiceInfo = new ServiceInfo("ab2222", JobStatus.IN_PROGRESS, isPause, "someID",
+ ServiceInfo expectedServiceInfo = new ServiceInfo("vid1", JobStatus.IN_PROGRESS, isPause, "someID",
"someName", "myProject", "NFT1", "NFTJSSSS-NFT1", "greatTenant", "greatTenant", "mtn3", null,
"mySubType", "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", null, names.get(Keys.SERVICE_NAME),
"300adb1e-9b0c-4d52-bfb5-fa5393c4eabb", "AIM_TRANSPORT_00004", "1.0", jobId, null);
diff --git a/vid-automation/src/test/java/org/onap/vid/api/BaseApiAaiTest.java b/vid-automation/src/test/java/org/onap/vid/api/BaseApiAaiTest.java
index 4ac38a0e7..69a6f66cc 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/BaseApiAaiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/BaseApiAaiTest.java
@@ -15,9 +15,9 @@ import java.net.URI;
import java.net.URISyntaxException;
import static net.javacrumbs.jsonunit.JsonMatchers.jsonStringEquals;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.either;
import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
import static vid.automation.test.services.SimulatorApi.registerExpectation;
/**
diff --git a/vid-automation/src/test/java/org/onap/vid/api/BaseApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/BaseApiTest.java
index 223657170..e7c6045a4 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/BaseApiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/BaseApiTest.java
@@ -1,11 +1,10 @@
package org.onap.vid.api;
-import com.att.automation.common.report_portal_integration.listeners.ReportPortalListener;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.google.common.primitives.Ints;
import org.apache.commons.io.IOUtils;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.SerializationConfig;
import org.glassfish.jersey.client.ClientProperties;
@@ -19,7 +18,6 @@ import org.springframework.web.client.DefaultResponseErrorHandler;
import org.springframework.web.client.RestTemplate;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Listeners;
import vid.automation.test.infra.FeaturesTogglingConfiguration;
import vid.automation.test.services.UsersService;
import vid.automation.test.utils.CookieAndJsonHttpHeadersInterceptor;
@@ -44,7 +42,6 @@ import static org.hamcrest.CoreMatchers.everyItem;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.greaterThan;
-@Listeners(ReportPortalListener.class)
public class BaseApiTest {
protected static final Logger LOGGER = LogManager.getLogger(BaseApiTest.class);
@@ -100,7 +97,7 @@ public class BaseApiTest {
static String password = "euser";
static final int userId = 2222;
- static final String loginId = "ab2222";
+ static final String loginId = "vid1";
static final int roleId = 2222221;
static final int logRoleId = 2222222;
}
diff --git a/vid-automation/src/test/java/org/onap/vid/api/BaseMsoApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/BaseMsoApiTest.java
index 37601a65e..1495f1852 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/BaseMsoApiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/BaseMsoApiTest.java
@@ -1,6 +1,5 @@
package org.onap.vid.api;
-import com.att.automation.common.report_portal_integration.annotations.Step;
import com.google.common.collect.ImmutableMap;
import org.json.JSONException;
import org.onap.vid.model.mso.MsoResponseWrapper2;
@@ -17,8 +16,8 @@ import vid.automation.test.services.SimulatorApi.RegistrationStrategy;
import java.io.IOException;
import java.lang.reflect.Method;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
public class BaseMsoApiTest extends BaseApiTest {
@@ -53,7 +52,6 @@ public class BaseMsoApiTest extends BaseApiTest {
}
}
- @Step(description = "method: ${method}, uri: ${uri}, body: ${body}")
protected MsoResponseWrapper2 callMsoForResponseWrapper(HttpMethod method, String uri, String body) {
MsoResponseWrapper2 responseWrapper;
switch (method) {
diff --git a/vid-automation/src/test/java/org/onap/vid/api/ChangeManagementApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/ChangeManagementApiTest.java
index 93f721956..2ad68d75d 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/ChangeManagementApiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/ChangeManagementApiTest.java
@@ -20,8 +20,8 @@ import org.onap.vid.model.workflow.VnfWorkflowRelationAllResponse;
import org.onap.vid.model.workflow.VnfWorkflowRelationRequest;
import org.onap.vid.model.workflow.VnfWorkflowRelationResponse;
import org.onap.vid.model.workflow.WorkflowsDetail;
-import org.opencomp.vid.model.mso.*;
-import org.opencomp.vid.model.workflow.*;
+import org.onap.vid.model.mso.*;
+import org.onap.vid.model.workflow.*;
import org.springframework.http.HttpStatus;
import org.springframework.util.StopWatch;
import org.testng.Assert;
diff --git a/vid-automation/src/test/java/org/onap/vid/api/OperationalEnvironmentControllerApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/OperationalEnvironmentControllerApiTest.java
index 222b0f5fb..e5df2d3b9 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/OperationalEnvironmentControllerApiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/OperationalEnvironmentControllerApiTest.java
@@ -22,8 +22,8 @@ import java.util.LinkedList;
import java.util.stream.Collectors;
import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
import static org.springframework.http.HttpStatus.BAD_REQUEST;
import static org.springframework.http.HttpStatus.METHOD_NOT_ALLOWED;
diff --git a/vid-automation/src/test/java/org/onap/vid/api/ProbeApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/ProbeApiTest.java
index 54093ec56..931f0004a 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/ProbeApiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/ProbeApiTest.java
@@ -2,6 +2,7 @@ package org.onap.vid.api;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
+import org.hamcrest.MatcherAssert;
import org.junit.Assert;
import org.onap.simulator.presetGenerator.presets.BasePresets.BasePreset;
import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubscribersGet;
@@ -93,10 +94,10 @@ public class ProbeApiTest extends BaseApiTest {
ExternalComponentStatus aaiGetAllSubscribersStatus = aaiGetAllSubscribersResult.get();
Assert.assertEquals(aaiGetAllSubscribersStatus.isAvailable(),expectedStatus.isAvailable());
- Assert.assertThat(requestMetadataReflected(aaiGetAllSubscribersStatus.getMetadata()),is(requestMetadataReflected(expectedStatus.getMetadata())));
- Assert.assertThat(aaiGetAllSubscribersStatus.getMetadata().getUrl(), both(endsWith(expectedStatus.getMetadata().getUrl())).and(startsWith("http")));
+ MatcherAssert.assertThat(requestMetadataReflected(aaiGetAllSubscribersStatus.getMetadata()),is(requestMetadataReflected(expectedStatus.getMetadata())));
+ MatcherAssert.assertThat(aaiGetAllSubscribersStatus.getMetadata().getUrl(), both(endsWith(expectedStatus.getMetadata().getUrl())).and(startsWith("http")));
- Assert.assertThat(aaiGetAllSubscribersStatus.getMetadata().getDescription(),
+ MatcherAssert.assertThat(aaiGetAllSubscribersStatus.getMetadata().getDescription(),
anyOf(equalTo(expectedStatus.getMetadata().getDescription()), startsWith(expectedStatus.getMetadata().getDescription())));
}
diff --git a/vid-automation/src/test/java/org/onap/vid/api/SampleApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/SampleApiTest.java
index c57a90aef..2b78cdb91 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/SampleApiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/SampleApiTest.java
@@ -11,8 +11,8 @@ import vid.automation.test.services.SimulatorApi;
import java.io.IOException;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
public class SampleApiTest extends BaseApiTest {
diff --git a/vid-automation/src/test/java/org/onap/vid/model/probe/ExternalComponentStatus.java b/vid-automation/src/test/java/org/onap/vid/model/probe/ExternalComponentStatus.java
index 439764945..b247613d6 100644
--- a/vid-automation/src/test/java/org/onap/vid/model/probe/ExternalComponentStatus.java
+++ b/vid-automation/src/test/java/org/onap/vid/model/probe/ExternalComponentStatus.java
@@ -1,7 +1,7 @@
package org.onap.vid.model.probe;
public class ExternalComponentStatus {
- public enum Component {AAI, MSO}
+ public enum Component {AAI, MSO, SCHEDULER}
private Component component;
private boolean available;
private HttpRequestMetadata metadata;
diff --git a/vid-automation/src/test/java/org/onap/vid/more/LoggerFormatTest.java b/vid-automation/src/test/java/org/onap/vid/more/LoggerFormatTest.java
index 6656a6c6b..fd8f48279 100644
--- a/vid-automation/src/test/java/org/onap/vid/more/LoggerFormatTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/more/LoggerFormatTest.java
@@ -14,9 +14,9 @@ import java.util.HashMap;
import java.util.Map;
import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
-import static org.junit.Assert.assertThat;
public class LoggerFormatTest extends BaseApiTest {
diff --git a/vid-automation/src/test/java/org/onap/vid/more/RequestIdFilterInstalled.java b/vid-automation/src/test/java/org/onap/vid/more/RequestIdFilterInstalled.java
index 5a0a0f845..560538737 100644
--- a/vid-automation/src/test/java/org/onap/vid/more/RequestIdFilterInstalled.java
+++ b/vid-automation/src/test/java/org/onap/vid/more/RequestIdFilterInstalled.java
@@ -4,8 +4,8 @@ import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
-import org.onap.vid.api.OperationalEnvironmentControllerApiTest;
import org.onap.vid.api.BaseApiTest;
+import org.onap.vid.api.OperationalEnvironmentControllerApiTest;
import org.onap.vid.api.ServiceInstanceMsoApiTest;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
@@ -18,9 +18,9 @@ import vid.automation.test.services.SimulatorApi;
import java.util.UUID;
import static org.hamcrest.CoreMatchers.*;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.Matchers.nullValue;
-import static org.junit.Assert.assertThat;
import static org.onap.vid.api.CategoryParametersApiTest.GET_CATEGORY_PARAMETER_PROPERTIES;
import static org.onap.vid.api.pProbeMsoApiTest.MSO_CREATE_CONFIGURATION;
import static org.springframework.http.HttpHeaders.AUTHORIZATION;
diff --git a/vid-automation/src/test/resources/test_config.properties b/vid-automation/src/test/resources/test_config.properties
index ce4ce6a7e..db876b7df 100644
--- a/vid-automation/src/test/resources/test_config.properties
+++ b/vid-automation/src/test/resources/test_config.properties
@@ -1,3 +1,3 @@
-test.loginId=ab2222
-test.loginPassword=ab2222
+test.loginId=vid1
+test.loginPassword=Kp8bJ4SXszM0WX