diff options
author | Seshu Kumar M <seshu.kumar.m@huawei.com> | 2018-04-19 12:03:54 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-04-19 12:03:54 +0000 |
commit | 6c9f839aa8e8dd848eb10216713490a17726c86c (patch) | |
tree | 902046a129d26046788005b49f2d8bb044554762 /common/src/test/java/org/openecomp/mso | |
parent | e75e31d0d63c3ef9f63f1d81edcef0e47ad8123a (diff) | |
parent | 9218d80e65bf3eaa01e7942730bac8c72dcb7862 (diff) |
Merge "AAIRestClient support for Basic Auth"
Diffstat (limited to 'common/src/test/java/org/openecomp/mso')
-rw-r--r-- | common/src/test/java/org/openecomp/mso/client/aai/AAIResourcesClientTest.java | 15 |
1 files changed, 15 insertions, 0 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"); |