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
Data Flow
Data Enrichment
wks
Commits
d0825862
Commit
d0825862
authored
Sep 12, 2020
by
harshit aggarwal
Browse files
Removing trailing slash
parent
015f4336
Pipeline
#8161
passed with stages
in 13 minutes and 54 seconds
Changes
1
Pipelines
4
Show whitespace changes
Inline
Side-by-side
testing/wks-test-core/src/test/java/org/opengroup/osdu/wks/stepdefs/IntegrationTestStepDefs.java
View file @
d0825862
...
...
@@ -350,8 +350,8 @@ public class IntegrationTestStepDefs implements En {
JsonElement
jsonBody
=
new
Gson
().
fromJson
(
payload
,
JsonElement
.
class
);
payload
=
new
Gson
().
toJson
(
jsonBody
);
this
.
context
.
setInputPayload
(
payload
);
// Changing environment variable name to STORAGE_URL to maintain consist
a
ncy in naming
String
storageURL
=
System
.
getProperty
(
"STORAGE_URL"
,
System
.
getenv
(
"STORAGE_URL"
));
// Changing environment variable name to STORAGE_URL to maintain consist
e
ncy in naming
String
storageURL
=
System
.
getProperty
(
"STORAGE_URL"
,
System
.
getenv
(
"STORAGE_URL"
))
.
replaceFirst
(
"/*$"
,
""
)
;
HttpRequest
httpRequest
=
HttpRequest
.
builder
().
url
(
storageURL
+
AutomationConstants
.
POST_ENDPOINT
)
.
body
(
jsonBody
.
toString
()).
httpMethod
(
HttpRequest
.
PUT
).
requestHeaders
(
this
.
context
.
getAuthHeaders
())
.
build
();
...
...
@@ -361,8 +361,9 @@ public class IntegrationTestStepDefs implements En {
}
private
void
deleteFromStorage
(
String
recordId
)
{
String
storageURL
=
System
.
getProperty
(
"STORAGE_URL"
,
System
.
getenv
(
"STORAGE_URL"
))
String
storageURL
=
System
.
getProperty
(
"STORAGE_URL"
,
System
.
getenv
(
"STORAGE_URL"
))
.
replaceFirst
(
"/*$"
,
""
)
+
AutomationConstants
.
DELETE_ENDPOINT
+
recordId
;
HttpRequest
httpRequest
=
HttpRequest
.
builder
().
url
(
storageURL
)
.
httpMethod
(
HttpRequest
.
DELETE
).
requestHeaders
(
this
.
context
.
getAuthHeaders
())
.
build
();
...
...
@@ -377,7 +378,7 @@ public class IntegrationTestStepDefs implements En {
}
private
String
storageGetResponse
(
String
recordId
)
{
String
reqURI
=
System
.
getProperty
(
"STORAGE_URL"
,
System
.
getenv
(
"STORAGE_URL"
))
String
reqURI
=
System
.
getProperty
(
"STORAGE_URL"
,
System
.
getenv
(
"STORAGE_URL"
))
.
replaceFirst
(
"/*$"
,
""
)
+
AutomationConstants
.
GET_ENDPOINT
+
recordId
;
HttpRequest
httpRequest
=
HttpRequest
.
builder
().
url
(
reqURI
).
httpMethod
(
HttpRequest
.
GET
)
.
requestHeaders
(
this
.
context
.
getAuthHeaders
()).
build
();
...
...
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