Skip to content
Snippets Groups Projects
Commit 0ad4138e authored by Manish Jangid's avatar Manish Jangid
Browse files

Merge branch 'aws-integration-merge' into 'master'

Removed test validations on cors response headers

See merge request !349
parents 2d8e5e13 d54e9b0f
No related branches found
No related tags found
1 merge request!349Removed test validations on cors response headers
Pipeline #167309 failed
......@@ -92,8 +92,8 @@ The following software have components provided under the terms of this license:
- Google APIs Client Library for Java (from https://repo1.maven.org/maven2/com/google/api-client/google-api-client)
- Google App Engine extensions to the Google HTTP Client Library for Java. (from https://repo1.maven.org/maven2/com/google/http-client/google-http-client-appengine)
- Google Cloud Core (from https://github.com/googleapis/google-cloud-java, https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-core, https://github.com/googleapis/java-core)
- Google Cloud Core HTTP (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-core-http, https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-core-http, https://github.com/googleapis/java-core)
- Google Cloud Core gRPC (from https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-core-grpc, https://github.com/googleapis/java-core)
- Google Cloud Core HTTP (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-core-http, https://github.com/googleapis/google-cloud-java, https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-core-http, https://github.com/googleapis/java-core)
- Google Cloud Core gRPC (from https://github.com/googleapis/google-cloud-java, https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-core-grpc, https://github.com/googleapis/java-core)
- Google Cloud Datastore (from https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-datastore, https://github.com/googleapis/java-datastore)
- Google Cloud IAM Service Account Credentials (from https://github.com/googleapis/google-cloud-java, https://github.com/googleapis/java-iamcredentials)
- Google Cloud Logging (from https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-logging, https://github.com/googleapis/java-logging)
......
......@@ -14,6 +14,7 @@
package org.opengroup.osdu.notification.api;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.junit.After;
import org.junit.AfterClass;
......@@ -132,4 +133,26 @@ public class TestPubsubEndpointHMAC extends PubsubEndpointHMACTests {
awssubscriptionService.delete(subscriptionId);
}
@Override
@Test
public void should_return20X_when_usingCredentialsWithOpsPermission() throws Exception{
createResource();
try {
ClientResponse response = descriptor.run(getArg(), testUtils.getOpsToken());
assertEquals(error(response.getStatus() == 204 ? "" : response.getEntity(String.class)), expectedOkResponseCode(), response.getStatus());
assertEquals("DENY", response.getHeaders().getFirst("X-Frame-Options"));
assertEquals("1; mode=block", response.getHeaders().getFirst("X-XSS-Protection"));
assertEquals("nosniff", response.getHeaders().getFirst("X-Content-Type-Options"));
assertEquals("no-cache, no-store, must-revalidate", response.getHeaders().getFirst("Cache-Control"));
assertEquals("default-src 'self'", response.getHeaders().getFirst("Content-Security-Policy"));
assertTrue(response.getHeaders().get("Strict-Transport-Security").get(0).contains("max-age=31536000"));
assertTrue(response.getHeaders().get("Strict-Transport-Security").get(0).contains("includeSubDomains"));
assertEquals("0", response.getHeaders().getFirst("Expires"));
} finally {
deleteResource();
}
}
}
\ 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