Commit 708a4da8 authored by Kamlesh Todai's avatar Kamlesh Todai
Browse files

Merge branch 'gcp_fixes' into 'master'

Gcp fixes

See merge request !364
parents e7431d75 d5957a0c
Pipeline #63687 canceled with stages
in 36 seconds
.idea
\ No newline at end of file
......@@ -69,7 +69,7 @@
},
{
"key": "LEGAL_HOST",
"value": "legal-{{HOSTNAME}}/api/legal/v1",
"value": "preship-asm.osdu-gcp.go3-nrg.projects.epam.com/api/legal/v1",
"enabled": true
},
{
......
{
"info": {
"_postman_id": "1d043451-9ece-4b9e-873f-0fe0ea733c56",
"_postman_id": "1c90b4e0-ae7f-4156-8d66-49abeeb0080c",
"name": "SeismicDMS API CI/CD v2.0",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
......@@ -21,9 +21,13 @@
"",
"var data = JSON.parse(responseBody)",
"pm.environment.set(\"access_token\", data.access_token);",
"if (cp == \"AWS\" || cp == \"IBM\") {",
"if (cp == \"AWS\" || cp == \"IBM\" || cp == \"GCP\") {",
" pm.environment.set(\"id_token\", data.id_token);",
"}",
"if (cp == \"GCP\") {",
" pm.environment.set(\"gcp_access_token\", data.access_token)",
" pm.environment.set(\"access_token\", data.id_token);",
"}",
"// Uncomment if server returns a new refresh_token,",
"// otherwise comment out to prevent overwriting it with null",
"if (cp == \"Azure\") {",
......@@ -444,7 +448,11 @@
"script": {
"exec": [
"pm.environment.set(\"tagName\", \"SeismicDMS-Legal-Tag-Test\" + _.random(1, 9999999));",
""
"",
"cp = pm.environment.get(\"cloud_platform\");",
"if (cp == \"GCP\") {",
" pm.environment.set(\"access_token\", pm.environment.get(\"gcp_access_token\"));",
"}"
],
"type": "text/javascript"
}
......@@ -459,7 +467,10 @@
"/*pm.test(\"Status description - Created LegalTag successfully.\", function () {",
" pm.response.to.have.status(\"Created LegalTag successfully.\");",
"});*/",
"",
"cp = pm.environment.get(\"cloud_platform\");",
"if (cp == \"GCP\") {",
" pm.environment.set(\"access_token\", pm.environment.get(\"id_token\"));",
"}",
"",
"//capture the legal tag name from response",
"try {",
......
{
"info": {
"_postman_id": "5c6f5782-1df7-4a61-9017-cc7bb15a3be9",
"_postman_id": "20d13bd8-5dfc-4e00-8bc6-fa6b22a02ebd",
"name": "Wellbore DDMS CI/CD v1.2",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
......@@ -21,9 +21,13 @@
"",
"var data = JSON.parse(responseBody)",
"pm.environment.set(\"access_token\", data.access_token);",
"if (cp == \"AWS\" || cp == \"IBM\") {",
"if (cp == \"AWS\" || cp == \"IBM\" || cp == \"GCP\") {",
" pm.environment.set(\"id_token\", data.id_token);",
"}",
"if (cp == \"GCP\") {",
" pm.environment.set(\"gcp_access_token\", data.access_token)",
" pm.environment.set(\"access_token\", data.id_token);",
"}",
"// Uncomment if server returns a new refresh_token,",
"// otherwise comment out to prevent overwriting it with null",
"if (cp == \"Azure\") {",
......@@ -516,7 +520,11 @@
"script": {
"exec": [
"pm.environment.set(\"tagName\", \"Wellbore-Legal-Tag-Test\" + _.random(1, 9999999));",
""
"",
"cp = pm.environment.get(\"cloud_platform\");",
"if (cp == \"GCP\") {",
" pm.environment.set(\"access_token\", pm.environment.get(\"gcp_access_token\"));",
"}"
],
"type": "text/javascript"
}
......@@ -531,7 +539,10 @@
"/*pm.test(\"Status description - OK\", function () {",
" pm.response.to.have.status(\"OK\");",
"});*/",
"",
"cp = pm.environment.get(\"cloud_platform\");",
"if (cp == \"GCP\") {",
" pm.environment.set(\"access_token\", pm.environment.get(\"id_token\"));",
"}",
"//capture the legal tag name from response",
"//capture the legal tag name from response",
"try {",
......@@ -542,6 +553,7 @@
" console.log(createdLegaltagName.length);",
" tests[\"Leagal tag created: \" + createdLegaltagName] = createdLegaltagName.length > 1;",
"}",
"",
"catch (e) {",
" console.log(e.message);",
"}"
......
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