Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
Domain Data Management Services
Well-Planning-Execution
Depreciated Well Planning
Commits
630cf81a
Commit
630cf81a
authored
Jan 19, 2021
by
Sheng Wang
Browse files
add more logs to SchemaUtil, LegalTagUtils and EntityUtil
parent
82cd5f1c
Pipeline
#22105
failed with stages
in 10 minutes and 40 seconds
Changes
3
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
testing/wd-test-core/src/main/java/org/opengroup/osdu/wd/test/core/util/EntityUtil.java
View file @
630cf81a
...
...
@@ -32,6 +32,7 @@ public class EntityUtil {
ClientResponse
response
=
TestUtils
.
send
(
getEntityUrl
(),
path
,
"PUT"
,
headers
,
body
,
""
);
Assert
.
assertEquals
(
HttpStatus
.
SC_CREATED
,
response
.
getStatus
());
Thread
.
sleep
(
100
);
System
.
out
.
println
(
String
.
format
(
"created entity: %s-%s"
,
type
,
id
));
long
version
=
getVersion
(
response
,
type
,
id
);
return
version
;
}
...
...
@@ -58,6 +59,7 @@ public class EntityUtil {
Map
<
String
,
String
>
headers
=
HeaderUtils
.
getHeaders
(
TenantUtils
.
getTenantName
(),
token
);
ClientResponse
response
=
TestUtils
.
send
(
getEntityUrl
(),
path
,
"DELETE"
,
headers
,
""
,
""
);
Assert
.
assertEquals
(
HttpStatus
.
SC_NO_CONTENT
,
response
.
getStatus
());
System
.
out
.
println
(
String
.
format
(
"deleted entity: %s-%s"
,
type
,
id
));
return
response
;
}
...
...
@@ -66,6 +68,7 @@ public class EntityUtil {
Map
<
String
,
String
>
headers
=
HeaderUtils
.
getHeaders
(
TenantUtils
.
getTenantName
(),
token
);
ClientResponse
response
=
TestUtils
.
send
(
getEntityUrl
(),
path
,
"DELETE"
,
headers
,
""
,
""
);
Assert
.
assertEquals
(
HttpStatus
.
SC_NO_CONTENT
,
response
.
getStatus
());
System
.
out
.
println
(
String
.
format
(
"purged entity: %s-%s"
,
type
,
id
));
return
response
;
}
...
...
@@ -84,6 +87,7 @@ public class EntityUtil {
Map
<
String
,
String
>
headers
=
HeaderUtils
.
getHeaders
(
TenantUtils
.
getTenantName
(),
token
);
ClientResponse
response
=
TestUtils
.
send
(
getEntityUrl
(),
path
,
"DELETE"
,
headers
,
""
,
""
);
Assert
.
assertEquals
(
HttpStatus
.
SC_NO_CONTENT
,
response
.
getStatus
());
System
.
out
.
println
(
String
.
format
(
"deleted entity version: %s-%s:%d"
,
type
,
id
,
version
));
return
response
;
}
...
...
@@ -92,6 +96,7 @@ public class EntityUtil {
Map
<
String
,
String
>
headers
=
HeaderUtils
.
getHeaders
(
TenantUtils
.
getTenantName
(),
token
);
ClientResponse
response
=
TestUtils
.
send
(
getEntityUrl
(),
path
,
"DELETE"
,
headers
,
""
,
""
);
Assert
.
assertEquals
(
HttpStatus
.
SC_NO_CONTENT
,
response
.
getStatus
());
System
.
out
.
println
(
String
.
format
(
"purged entity version: %s-%s:%d"
,
type
,
id
,
version
));
return
response
;
}
...
...
testing/wd-test-core/src/main/java/org/opengroup/osdu/wd/test/core/util/LegalTagUtils.java
View file @
630cf81a
...
...
@@ -38,11 +38,14 @@ public class LegalTagUtils {
assertEquals
(
HttpStatus
.
SC_CREATED
,
response
.
getStatus
());
Thread
.
sleep
(
100
);
System
.
out
.
println
(
String
.
format
(
"created legal tag: %s"
,
name
));
return
response
;
}
public
static
ClientResponse
delete
(
String
legalTagName
,
String
token
)
throws
Exception
{
return
TestUtils
.
send
(
getLegalUrl
(),
"legaltags/"
+
legalTagName
,
"DELETE"
,
HeaderUtils
.
getHeaders
(
TenantUtils
.
getTenantName
(),
token
),
""
,
""
);
ClientResponse
response
=
TestUtils
.
send
(
getLegalUrl
(),
"legaltags/"
+
legalTagName
,
"DELETE"
,
HeaderUtils
.
getHeaders
(
TenantUtils
.
getTenantName
(),
token
),
""
,
""
);
System
.
out
.
println
(
String
.
format
(
"deleted legal tag: %s"
,
legalTagName
));
return
response
;
}
protected
static
String
getLegalUrl
()
{
...
...
testing/wd-test-core/src/main/java/org/opengroup/osdu/wd/test/core/util/SchemaUtil.java
View file @
630cf81a
...
...
@@ -26,6 +26,7 @@ public class SchemaUtil {
ClientResponse
response
=
TestUtils
.
send
(
getSchemaUrl
(),
"schema"
,
"PUT"
,
HeaderUtils
.
getHeaders
(
TenantUtils
.
getTenantName
(),
token
),
body
,
""
);
assertEquals
(
HttpStatus
.
SC_OK
,
response
.
getStatus
());
Thread
.
sleep
(
100
);
System
.
out
.
println
(
"created schema."
);
return
response
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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