Commit bd884626 authored by Kamlesh Todai's avatar Kamlesh Todai
Browse files

Merge branch 'Gwenola.Michaud-master-patch-54894' into 'master'

Update JMeter Collection/04_JMeter_Setting_Deliver/JMeter Delivery API CI-CD...

See merge request !119
parents e5be0951 2b935ba0
Pipeline #5445 failed with stages
in 8 seconds
{
"info": {
"_postman_id": "a0a11ac3-079d-45e6-9e8d-77021fda4e48",
"name": "JMeter Delivery API CI/CD v1.0",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Configure collection",
"item": [
{
"name": "Refresh Token",
"event": [
{
"listen": "test",
"script": {
"id": "59a503e7-15b4-491e-9d73-66be3df3f5d8",
"exec": [
"// this snippet extracts the new access and id tokens",
"// and puts them to environment variables",
"cp = pm.environment.get(\"cloud_platform\");",
"",
"var data = JSON.parse(responseBody)",
"pm.environment.set(\"access_token\", data.access_token);",
"if (cp == \"AWS\") {",
" pm.environment.set(\"id_token\", data.id_token);",
"}",
"// Uncomment if server returns a new refresh_token,",
"// otherwise comment out to prevent overwriting it with null",
"if (cp == \"Azure\") {",
" pm.environment.set(\"refresh_token\", data.refresh_token);",
"}"
],
"type": "text/javascript"
}
},
{
"listen": "prerequest",
"script": {
"id": "642dfd92-97b2-4121-b235-b33f00e989c1",
"exec": [
"cp = pm.environment.get(\"cloud_platform\");\r",
"\r",
"if (cp == \"GCP\") {\r",
" pm.environment.set(\"Scope\", \"email openid profile\")\r",
" }\r",
"else {\r",
" client_id = pm.environment.get(\"CLIENT_ID\");\r",
" pm.environment.set(\"Scope\", client_id + \"/.default openid profile offline_access\")\r",
"}"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "noauth"
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/x-www-form-urlencoded"
},
{
"key": "Ocp-Apim-Subscription-Key",
"type": "text",
"value": "xxxxxxxx",
"disabled": true
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "grant_type",
"value": "refresh_token",
"type": "text"
},
{
"key": "client_id",
"value": "{{CLIENT_ID}}",
"description": "Supply your client id as an environment variable",
"type": "text"
},
{
"key": "client_secret",
"value": "{{CLIENT_SECRET}}",
"description": "Supply your client secret as an environment variable",
"type": "text"
},
{
"key": "refresh_token",
"value": "{{refresh_token}}",
"type": "text"
},
{
"key": "scope",
"value": "{{Scope}}",
"type": "text"
}
],
"options": {
"urlencoded": {}
}
},
"url": {
"raw": "{{Token_Fetch_URL}}",
"host": [
"{{Token_Fetch_URL}}"
]
}
},
"response": []
}
],
"protocolProfileBehavior": {}
},
{
"name": "Delivery",
"item": [
{
"name": "01 Delivery - Retrieve the file for the well Log wpc record",
"event": [
{
"listen": "test",
"script": {
"id": "00b4116e-5824-496c-9ea8-bb33e4fc9c93",
"exec": [
"// Ensure the API was able to send a successful response",
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"",
"// Ensure a signed URL is returned for the file in question. ",
"pm.test(\"Signed URL returned? :\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.processed).to.be.ok;",
" pm.expect(jsonData.unprocessed.length).to.equal(0);",
"});",
"",
"",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/json"
},
{
"key": "data-partition-id",
"type": "text",
"value": "{{data-partition-id}}"
},
{
"key": "accept",
"type": "text",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n\t\"srns\" : [ \"srn:file/las2:944870757489505930982033:\" ] \r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://{{DELIVERY_HOST}}",
"protocol": "https",
"host": [
"{{DELIVERY_HOST}}"
]
},
"description": "Retrieve the latest version of one record based on id (SRN), and only return the columns specified in the attributes section of the request"
},
"response": []
},
{
"name": "02 Delivery - Retrieve the file for the wellboreMarker wpc record",
"event": [
{
"listen": "test",
"script": {
"id": "22e5e1cd-352b-47cc-bdf9-5b3d1c49bfef",
"exec": [
"// Ensure the API was able to send a successful response",
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"",
"// Ensure a signed URL is returned for the file in question. ",
"pm.test(\"Signed URL returned? :\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.processed).to.be.ok;",
" pm.expect(jsonData.unprocessed.length).to.equal(0);",
"});",
"",
"",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/json"
},
{
"key": "data-partition-id",
"type": "text",
"value": "{{data-partition-id}}"
},
{
"key": "accept",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n\t\"srns\" : [ \"srn:file/csv:33554447243488057924904:\" ] \r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://{{DELIVERY_HOST}}",
"protocol": "https",
"host": [
"{{DELIVERY_HOST}}"
]
},
"description": "Retrieve the latest version of one record based on id (SRN), and only return the columns specified in the attributes section of the request"
},
"response": []
},
{
"name": "03 Delivery - Retrieve the file for the wellboreTrajectory wpc record",
"event": [
{
"listen": "test",
"script": {
"id": "89b654c1-486e-4ab0-b898-6236ba282bf6",
"exec": [
"// Ensure the API was able to send a successful response",
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"",
"// Ensure a signed URL is returned for the file in question. ",
"pm.test(\"Signed URL returned? :\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.processed).to.be.ok;",
" pm.expect(jsonData.unprocessed.length).to.equal(0);",
"});",
"",
"",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/json"
},
{
"key": "data-partition-id",
"type": "text",
"value": "{{data-partition-id}}"
},
{
"key": "accept",
"type": "text",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n\t\"srns\" : [ \"srn:file/csv:898844761925351613:\" ] \r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://{{DELIVERY_HOST}}",
"protocol": "https",
"host": [
"{{DELIVERY_HOST}}"
]
},
"description": "Retrieve the latest version of one record based on id (SRN), and only return the columns specified in the attributes section of the request"
},
"response": []
}
],
"protocolProfileBehavior": {}
}
],
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{access_token}}",
"type": "string"
}
]
},
"event": [
{
"listen": "prerequest",
"script": {
"id": "622812c9-c9c1-4ec1-95ae-ca8ed79331bc",
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"id": "f94d2131-f56e-42ac-854e-22dcc444ca88",
"type": "text/javascript",
"exec": [
""
]
}
}
],
"protocolProfileBehavior": {}
}
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