aboutsummaryrefslogtreecommitdiffstats
path: root/common/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/test')
-rw-r--r--common/src/test/java/org/openecomp/mso/client/aai/AAIResourcesClientTest.java15
-rw-r--r--common/src/test/resources/aai.properties4
2 files changed, 18 insertions, 1 deletions
diff --git a/common/src/test/java/org/openecomp/mso/client/aai/AAIResourcesClientTest.java b/common/src/test/java/org/openecomp/mso/client/aai/AAIResourcesClientTest.java
index daf8130cd4..c7cc549130 100644
--- a/common/src/test/java/org/openecomp/mso/client/aai/AAIResourcesClientTest.java
+++ b/common/src/test/java/org/openecomp/mso/client/aai/AAIResourcesClientTest.java
@@ -78,6 +78,21 @@ public class AAIResourcesClientTest {
}
@Test
+ public void verifyBasicAuth() {
+ AAIResourceUri path = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test3");
+ wireMockRule.stubFor(get(
+ urlPathEqualTo("/aai/" + AAIVersion.LATEST + path.build().toString()))
+ .withHeader("Authorization", equalTo("Basic TVNPOk1TTw=="))
+ .willReturn(
+ aResponse()
+ .withHeader("Content-Type", "application/json")
+ .withBodyFile("aai/resources/mockObject.json")
+ .withStatus(200)));
+ AAIResourcesClient client = new AAIResourcesClient();
+ client.get(path);
+ }
+
+ @Test
public void verifyConnect() {
AAIResourceUri path = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test2");
AAIResourceUri path2 = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test3");
diff --git a/common/src/test/resources/aai.properties b/common/src/test/resources/aai.properties
index 9d9f1bdce9..897659b332 100644
--- a/common/src/test/resources/aai.properties
+++ b/common/src/test/resources/aai.properties
@@ -1 +1,3 @@
-aai.endpoint=http://localhost:8443 \ No newline at end of file
+aai.endpoint=http://localhost:8443
+aai.auth=2630606608347B7124C244AB0FE34F6F
+mso.msoKey=07a7159d3bf51a0e53be7a8f89699be7 \ No newline at end of file