From 466e8fa832c2e330467e7299ad1830da57a62c56 Mon Sep 17 00:00:00 2001 From: Rucha Deshpande <deshruch@amazon.com> Date: Thu, 13 May 2021 09:57:13 -0500 Subject: [PATCH] override failing tests with 403 --- .../notification/api/TestPubsubEndpointHMAC.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/testing/notification-test-aws/src/test/java/org/opengroup/osdu/notification/api/TestPubsubEndpointHMAC.java b/testing/notification-test-aws/src/test/java/org/opengroup/osdu/notification/api/TestPubsubEndpointHMAC.java index d19be5fa0..371d31d20 100644 --- a/testing/notification-test-aws/src/test/java/org/opengroup/osdu/notification/api/TestPubsubEndpointHMAC.java +++ b/testing/notification-test-aws/src/test/java/org/opengroup/osdu/notification/api/TestPubsubEndpointHMAC.java @@ -48,6 +48,18 @@ public class TestPubsubEndpointHMAC extends PubsubEndpointHMACTests { public void tearDown() throws Exception { this.testUtils = null; } - + @Test + @Override + public void should_return400_when_makingHttpRequestWithoutToken() throws Exception { + ClientResponse response = descriptor.run(getArg(), ""); + assertEquals(error(response.getEntity(String.class)), 403, response.getStatus()); + } + + @Test + @Override + 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