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 d19be5fa0bdca69cf1458daf7b300187f1eb1ce3..371d31d2069f1ff0da3588f494b54dbda202125f 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