Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
System
Partition
Commits
8d3c04f5
Commit
8d3c04f5
authored
May 06, 2021
by
Mingyang Zhu
Browse files
fix the int test failures
parent
e318a239
Pipeline
#38828
failed with stages
in 33 minutes and 2 seconds
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
testing/partition-test-core/src/main/java/org/opengroup/osdu/partition/util/BaseTestTemplate.java
View file @
8d3c04f5
...
@@ -20,6 +20,7 @@ import com.sun.jersey.api.client.ClientResponse;
...
@@ -20,6 +20,7 @@ import com.sun.jersey.api.client.ClientResponse;
import
org.junit.Test
;
import
org.junit.Test
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
public
abstract
class
BaseTestTemplate
extends
TestBase
{
public
abstract
class
BaseTestTemplate
extends
TestBase
{
...
@@ -69,7 +70,8 @@ public abstract class BaseTestTemplate extends TestBase {
...
@@ -69,7 +70,8 @@ public abstract class BaseTestTemplate extends TestBase {
deleteResource
();
deleteResource
();
assertEquals
(
error
(
response
.
getStatus
()
==
204
?
""
:
response
.
getEntity
(
String
.
class
)),
expectedOkResponseCode
(),
response
.
getStatus
());
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
(
"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
(
"*"
,
response
.
getHeaders
().
getFirst
(
"Access-Control-Allow-Origin"
));
assertEquals
(
"true"
,
response
.
getHeaders
().
getFirst
(
"Access-Control-Allow-Credentials"
));
assertEquals
(
"true"
,
response
.
getHeaders
().
getFirst
(
"Access-Control-Allow-Credentials"
));
assertEquals
(
"default-src 'self'"
,
response
.
getHeaders
().
getFirst
(
"Content-Security-Policy"
));
assertEquals
(
"default-src 'self'"
,
response
.
getHeaders
().
getFirst
(
"Content-Security-Policy"
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment