Commit 8d3c04f5 authored by Mingyang Zhu's avatar Mingyang Zhu
Browse files

fix the int test failures

parent e318a239
Pipeline #38828 failed with stages
in 33 minutes and 2 seconds
......@@ -20,6 +20,7 @@ import com.sun.jersey.api.client.ClientResponse;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public abstract class BaseTestTemplate extends TestBase {
......@@ -69,7 +70,8 @@ public abstract class BaseTestTemplate extends TestBase {
deleteResource();
assertEquals(error(response.getStatus() == 204 ? "" : response.getEntity(String.class)), expectedOkResponseCode(), response.getStatus());
assertEquals("GET, POST, PUT, DELETE, OPTIONS, HEAD, PATCH", response.getHeaders().getFirst("Access-Control-Allow-Methods"));
assertEquals("access-control-allow-origin, origin, content-type, accept, authorization, data-partition-id, correlation-id, appkey", response.getHeaders().getFirst("Access-Control-Allow-Headers"));
assertTrue("origin, content-type, accept, authorization, data-partition-id, correlation-id, appkey".equals(response.getHeaders().getFirst("Access-Control-Allow-Headers")) ||
"access-control-allow-origin, origin, content-type, accept, authorization, data-partition-id, correlation-id, appkey".equals(response.getHeaders().getFirst("Access-Control-Allow-Headers")));
assertEquals("*", response.getHeaders().getFirst("Access-Control-Allow-Origin"));
assertEquals("true", response.getHeaders().getFirst("Access-Control-Allow-Credentials"));
assertEquals("default-src 'self'", response.getHeaders().getFirst("Content-Security-Policy"));
......
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