Skip to content
Snippets Groups Projects
Commit 1f88f4db authored by Komal Makkar's avatar Komal Makkar
Browse files

403 change

parent 60a5535c
No related branches found
No related tags found
1 merge request!38Changes in IT to match Infra
Pipeline #15735 failed
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment