From aeccaf090d4425cc9ea588c9c3da86a4ea375c26 Mon Sep 17 00:00:00 2001 From: Ritika Kaushal <ritikaus@in.ibm.com> Date: Mon, 26 Jul 2021 09:18:12 +0000 Subject: [PATCH] Tenant validation ibm --- provider/notification-ibm/pom.xml | 2 +- .../osdu/notification/api/TestPubsubEndpointHMAC.java | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/provider/notification-ibm/pom.xml b/provider/notification-ibm/pom.xml index 5d97c4643..062ba56e9 100644 --- a/provider/notification-ibm/pom.xml +++ b/provider/notification-ibm/pom.xml @@ -44,7 +44,7 @@ <dependency> <groupId>org.opengroup.osdu</groupId> <artifactId>os-core-lib-ibm</artifactId> - <version>0.7.0</version> + <version>0.9.0</version> </dependency> <dependency> diff --git a/testing/notification-test-ibm/src/test/java/org/opengroup/osdu/notification/api/TestPubsubEndpointHMAC.java b/testing/notification-test-ibm/src/test/java/org/opengroup/osdu/notification/api/TestPubsubEndpointHMAC.java index 9a1f59c5a..e01b1c888 100644 --- a/testing/notification-test-ibm/src/test/java/org/opengroup/osdu/notification/api/TestPubsubEndpointHMAC.java +++ b/testing/notification-test-ibm/src/test/java/org/opengroup/osdu/notification/api/TestPubsubEndpointHMAC.java @@ -56,6 +56,14 @@ public class TestPubsubEndpointHMAC extends PubsubEndpointHMACTests { // TODO getting SubscriptionException only on ci-cd env super.should_return20XResponseCode_when_makingValidHttpsRequest(); } + + //running against tenant - 'nonexistenttenant' and entitlement throws 403 for invalid teanant + @Override + @Test + public void should_return401_when_noAccessOnCustomerTenant() throws Exception { + ClientResponse response = descriptor.runOnCustomerTenant(getArg(), getOsduTenantAdminCredentials()); + assertEquals(error( response.getEntity(String.class)),403, response.getStatus()); + } } \ No newline at end of file -- GitLab