Commit 1f88f4db authored by Komal Makkar's avatar Komal Makkar
Browse files

403 change

parent 60a5535c
Pipeline #15735 failed with stage
in 1 minute and 13 seconds
......@@ -58,4 +58,33 @@ public class TestPubsubEndpointHMAC extends PubsubEndpointHMACTests {
// If HTTP is a need, corresponding infra changes will be required for this test to function.
return;
}
// For the following 403 is the expceted result.
// Tracking in Issue: https://community.opengroup.org/osdu/platform/system/notification/-/issues/17
@Test
@Override
public void should_return401_when_accessingWithNoAccessCredentials() throws Exception{
ClientResponse response = descriptor.run(getArg(), testUtils.getNoAccessToken());
assertEquals(error( response.getEntity(String.class)), 403, response.getStatus());
}
@Test
public void should_return401_when_noAccessOnCustomerTenant() throws Exception {
ClientResponse response = descriptor.runOnCustomerTenant(getArg(), getOsduTenantAdminCredentials());
assertEquals(error( response.getEntity(String.class)), 403, response.getStatus());
}
@Test
@Override
public void should_return401_when_accessingWithEditorCredentials() throws Exception{
ClientResponse response = descriptor.run(getArg(), testUtils.getEditorToken());
assertEquals(error( response.getEntity(String.class)), 403, response.getStatus());
}
@Test
@Override
public void should_return401_when_accessingWithAdminCredentials() throws Exception{
ClientResponse response = descriptor.run(getArg(), testUtils.getAdminToken());
assertEquals(error( response.getEntity(String.class)), 403, response.getStatus());
}
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment