Commit 811a9513 authored by Darshana Herath's avatar Darshana Herath
Browse files

Adding exception handling.

parent 15e0d5d1
Pipeline #3512 failed with stages
in 8 seconds
......@@ -2611,25 +2611,20 @@
"pm.test(\"Status code is 201\", function () {",
" pm.response.to.have.status(201);",
"});",
"/*pm.test(\"Status description - Records created and/or updated successfully.\", function () {",
" pm.response.to.have.status(\"Records created and/or updated successfully.\");",
"});*/",
"try {",
"var jsonData = pm.response.json();",
"/*pm.test(\"Record ingested: \" , function () { ",
" pm.expect(jsonData.recordIds[0]).to.equal(pm.environment.get(\"recordID\"));",
" console.log(jsonData.recordIds);",
"});*/",
"",
"pm.test(\"No records were skipped\", function () {",
" // var jsonData = pm.response.json();",
" pm.expect(jsonData.skippedRecordIds.length).to.equal(0);",
" pm.environment.set(\"SeismicHorizonRecordID\", jsonData.recordIds[0]);",
"});",
"",
"pm.test(\"Record ingested:\"+ jsonData.recordIds[0] , function () {",
" //var jsonData = pm.response.json();",
" pm.expect(jsonData.recordIds.length)>0;",
"});"
"});",
"}",
"catch (e) {",
" console.log(e.message);",
"}",
""
],
"type": "text/javascript"
}
......@@ -2704,25 +2699,20 @@
"pm.test(\"Status code is 201\", function () {",
" pm.response.to.have.status(201);",
"});",
"/*pm.test(\"Status description - Records created and/or updated successfully.\", function () {",
" pm.response.to.have.status(\"Records created and/or updated successfully.\");",
"});*/",
"try {",
"var jsonData = pm.response.json();",
"/*pm.test(\"Record ingested: \" , function () { ",
" pm.expect(jsonData.recordIds[0]).to.equal(pm.environment.get(\"recordID\"));",
" console.log(jsonData.recordIds);",
"});*/",
"",
"pm.test(\"No records were skipped\", function () {",
" // var jsonData = pm.response.json();",
" pm.expect(jsonData.skippedRecordIds.length).to.equal(0);",
" pm.environment.set(\"SeismicHorizonRecordID\", jsonData.recordIds[0]);",
"});",
"",
"pm.test(\"Record ingested:\"+ jsonData.recordIds[0] , function () {",
" //var jsonData = pm.response.json();",
" pm.expect(jsonData.recordIds.length)>0;",
"});"
"});",
"}",
"catch (e) {",
" console.log(e.message);",
"}",
""
],
"type": "text/javascript"
}
......@@ -2796,28 +2786,19 @@
"pm.test(\"Status code is 201\", function () {",
" pm.response.to.have.status(201);",
"});",
"/*pm.test(\"Status description - Records created and/or updated successfully.\", function () {",
" pm.response.to.have.status(\"Records created and/or updated successfully.\");",
"});*/",
"",
"/*pm.test(\"Record ingested: \" , function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.recordIds[0]).to.equal(pm.environment.get(\"recordID\"));",
" console.log(jsonData.recordIds);",
"});*/",
"try {",
"var jsonData = pm.response.json();",
"pm.test(\"No records were skipped\", function () {",
" //var jsonData = pm.response.json();",
" pm.expect(jsonData.skippedRecordIds.length).to.equal(0);",
" pm.environment.set(\"SeismicTracenRecordID\", jsonData.recordIds[0]);",
" pm.environment.set(\"SeismicHorizonRecordID\", jsonData.recordIds[0]);",
"});",
"",
"pm.test(\"Record ingested:\"+ jsonData.recordIds[0] , function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.recordIds.length)>0;",
"});",
"",
"",
"}",
"catch (e) {",
" console.log(e.message);",
"}",
""
],
"type": "text/javascript"
......@@ -2892,28 +2873,19 @@
"pm.test(\"Status code is 201\", function () {",
" pm.response.to.have.status(201);",
"});",
"/*pm.test(\"Status description - Records created and/or updated successfully.\", function () {",
" pm.response.to.have.status(\"Records created and/or updated successfully.\");",
"});*/",
"",
"/*pm.test(\"Record ingested: \" , function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.recordIds[0]).to.equal(pm.environment.get(\"recordID\"));",
" console.log(jsonData.recordIds);",
"});*/",
"try {",
"var jsonData = pm.response.json();",
"pm.test(\"No records were skipped\", function () {",
" //var jsonData = pm.response.json();",
" pm.expect(jsonData.skippedRecordIds.length).to.equal(0);",
" pm.environment.set(\"SeismicTracenRecordID\", jsonData.recordIds[0]);",
" pm.environment.set(\"SeismicHorizonRecordID\", jsonData.recordIds[0]);",
"});",
"",
"pm.test(\"Record ingested:\"+ jsonData.recordIds[0] , function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.recordIds.length)>0;",
"});",
"",
"",
"}",
"catch (e) {",
" console.log(e.message);",
"}",
""
],
"type": "text/javascript"
......@@ -2988,26 +2960,19 @@
"pm.test(\"Status code is 201\", function () {",
" pm.response.to.have.status(201);",
"});",
"/*pm.test(\"Status description - Records created and/or updated successfully.\", function () {",
" pm.response.to.have.status(\"Records created and/or updated successfully.\");",
"});*/",
"try {",
"var jsonData = pm.response.json();",
"/*pm.test(\"Record ingested: \" , function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.recordIds[0]).to.equal(pm.environment.get(\"recordID\"));",
" console.log(jsonData.recordIds);",
"});*/",
"",
"pm.test(\"No records were skipped\", function () {",
" //var jsonData = pm.response.json();",
" pm.expect(jsonData.skippedRecordIds.length).to.equal(0);",
" pm.environment.set(\"SeismicAcquisitionProjectRecordID\", jsonData.recordIds[0]);",
" pm.environment.set(\"SeismicHorizonRecordID\", jsonData.recordIds[0]);",
"});",
"",
"pm.test(\"Record ingested:\"+ jsonData.recordIds[0] , function () {",
" //var jsonData = pm.response.json();",
" pm.expect(jsonData.recordIds.length)>0;",
"});",
"}",
"catch (e) {",
" console.log(e.message);",
"}",
""
],
"type": "text/javascript"
......@@ -3082,26 +3047,19 @@
"pm.test(\"Status code is 201\", function () {",
" pm.response.to.have.status(201);",
"});",
"/*pm.test(\"Status description - Records created and/or updated successfully.\", function () {",
" pm.response.to.have.status(\"Records created and/or updated successfully.\");",
"});*/",
"",
"/*pm.test(\"Record ingested: \" , function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.recordIds[0]).to.equal(pm.environment.get(\"recordID\"));",
" console.log(jsonData.recordIds);",
"});*/",
"try {",
"var jsonData = pm.response.json();",
"pm.test(\"No records were skipped\", function () {",
" //var jsonData = pm.response.json();",
" pm.expect(jsonData.skippedRecordIds.length).to.equal(0);",
" pm.environment.set(\"SeismicInterpretationProjectRecordID\", jsonData.recordIds[0]);",
" pm.environment.set(\"SeismicHorizonRecordID\", jsonData.recordIds[0]);",
"});",
"",
"pm.test(\"Record ingested:\"+ jsonData.recordIds[0] , function () {",
" //var jsonData = pm.response.json();",
" pm.expect(jsonData.recordIds.length)>0;",
"});",
"}",
"catch (e) {",
" console.log(e.message);",
"}",
""
],
"type": "text/javascript"
......@@ -3176,26 +3134,20 @@
"pm.test(\"Status code is 201\", function () {",
" pm.response.to.have.status(201);",
"});",
"/*pm.test(\"Status description - Records created and/or updated successfully.\", function () {",
" pm.response.to.have.status(\"Records created and/or updated successfully.\");",
"});*/",
"try {",
"var jsonData = pm.response.json();",
"/*pm.test(\"Record ingested: \" , function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.recordIds[0]).to.equal(pm.environment.get(\"recordID\"));",
" console.log(jsonData.recordIds);",
"});*/",
"",
"pm.test(\"No records were skipped\", function () {",
" //var jsonData = pm.response.json();",
" pm.expect(jsonData.skippedRecordIds.length).to.equal(0);",
" pm.environment.set(\"SeismicProcessingProjectRecordID\", jsonData.recordIds[0]);",
" pm.environment.set(\"SeismicHorizonRecordID\", jsonData.recordIds[0]);",
"});",
"",
"pm.test(\"Record ingested:\"+ jsonData.recordIds[0] , function () {",
" //var jsonData = pm.response.json();",
" pm.expect(jsonData.recordIds.length)>0;",
"});"
"});",
"}",
"catch (e) {",
" console.log(e.message);",
"}",
""
],
"type": "text/javascript"
}
......
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