update Postman collections and doc,with corrections
Issue-ID: INT-1340
Signed-off-by: Rene_Robert <rene.robert@orange.com>
Change-Id: Idcb5ef7669805f0d8c4266ee45310078d33260c2
diff --git a/test/postman/02_Onboard_VSP_part1.postman_collection.json b/test/postman/02_Onboard_VSP_part1.postman_collection.json
index 557b557..0e46193 100644
--- a/test/postman/02_Onboard_VSP_part1.postman_collection.json
+++ b/test/postman/02_Onboard_VSP_part1.postman_collection.json
@@ -1,6 +1,6 @@
{
"info": {
- "_postman_id": "e226e82c-74b6-42bc-a1e9-1168b860a234",
+ "_postman_id": "7f61efa5-8b7f-4593-9d57-26da61bb8604",
"name": "02_Onboard_VSP_part1",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
@@ -20,17 +20,17 @@
"var jsonData = pm.response.json();",
"var vsp_found = false;",
"for (var i = 0; i < jsonData.results.length; i++) { ",
- " if (jsonData.results[i].name === pm.globals.get(\"vsp_name\")) {",
+ " if (jsonData.results[i].name === pm.environment.get(\"vsp_name\")) {",
" vsp_found = true;",
" }",
"}",
"",
"if (vsp_found === false) {",
- " tests[pm.globals.get(\"vsp_name\")+\" does not yet exist, we continue\"] = true;",
+ " tests[pm.environment.get(\"vsp_name\")+\" does not yet exist, we continue\"] = true;",
"}",
"",
"else {",
- " tests[pm.globals.get(\"vsp_name\")+\" already exists, we stop the run\"] = false;",
+ " tests[pm.environment.get(\"vsp_name\")+\" already exists, we stop the run\"] = false;",
" postman.setNextRequest(null);",
"}"
],
@@ -98,18 +98,18 @@
"var jsonData = pm.response.json();",
"var vendor_found = false;",
"for (var i = 0; i < jsonData.results.length; i++) { ",
- " if (jsonData.results[i].name === pm.globals.get(\"vendor_name\")) {",
+ " if (jsonData.results[i].name === pm.environment.get(\"vendor_name\")) {",
" vendor_found = true;",
- " pm.globals.set(\"auto_vendor_id\", \"\"+jsonData.results[i].id+\"\");",
+ " pm.environment.set(\"auto_vendor_id\", \"\"+jsonData.results[i].id+\"\");",
" }",
"}",
"if (vendor_found === false) {",
- " tests[pm.globals.get(\"vendor_name\")+\" does not exists : we stop the run\"] = false;",
+ " tests[pm.environment.get(\"vendor_name\")+\" does not exists : we stop the run\"] = false;",
" postman.setNextRequest(null);",
"}",
"",
"else {",
- " tests[pm.globals.get(\"vendor_name\")+\" exists\"] = true;",
+ " tests[pm.environment.get(\"vendor_name\")+\" exists\"] = true;",
"}",
"",
"",
@@ -176,9 +176,9 @@
"});",
"",
"var jsonData = pm.response.json();",
- "pm.globals.set(\"auto_vsp_id\", \"\"+jsonData.itemId+\"\");",
- "pm.globals.set(\"auto_vsp_version_id\", \"\"+jsonData.version.id+\"\");",
- "pm.globals.set(\"auto_vsp_version_name\", \"\"+jsonData.version.name+\"\");",
+ "pm.environment.set(\"auto_vsp_id\", \"\"+jsonData.itemId+\"\");",
+ "pm.environment.set(\"auto_vsp_version_id\", \"\"+jsonData.version.id+\"\");",
+ "pm.environment.set(\"auto_vsp_version_name\", \"\"+jsonData.version.name+\"\");",
"",
"tests[\"VSP version is : \"+jsonData.version.status] = jsonData.version.status === \"Draft\";"
],