Skip to content

Commit a934237

Browse files
authored
Merge pull request #1 from johnddias/master
Added test for Login for bearer token automation
2 parents bbeadab + 2e7d2b2 commit a934237

File tree

1 file changed

+31
-16
lines changed

1 file changed

+31
-16
lines changed

Log Insight.postman_collection.json

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"variables": [],
33
"info": {
44
"name": "Log Insight",
5-
"_postman_id": "46fdd8c4-492d-e829-e62f-8383c085960f",
5+
"_postman_id": "8109ea74-f0d8-eed3-abf1-29499bdf3a3f",
66
"description": "",
77
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
88
},
@@ -454,7 +454,6 @@
454454
"url": {
455455
"raw": "https://{{li}}/api/v1/events?view=SIMPLE",
456456
"protocol": "https",
457-
"auth": {},
458457
"host": [
459458
"{{li}}"
460459
],
@@ -560,7 +559,7 @@
560559
},
561560
"response": [
562561
{
563-
"id": "47ba8ffe-b357-46de-964c-b32a5823386c",
562+
"id": "98297c89-fadb-45d6-9785-e6a0668210d9",
564563
"name": "Delete - License Reference: M502V-XXXXX-XXXXX-XXXXX-XXXXX",
565564
"originalRequest": {
566565
"url": "https://{{li}}/api/v1/licenses/M502V-XXXXX-XXXXX-XXXXX-XXXXX",
@@ -575,11 +574,12 @@
575574
"body": {
576575
"mode": "raw",
577576
"raw": ""
578-
}
577+
},
578+
"description": ""
579579
},
580580
"status": "OK",
581581
"code": 200,
582-
"_postman_previewlanguage": "",
582+
"_postman_previewlanguage": "Text",
583583
"_postman_previewtype": "parsed",
584584
"header": [],
585585
"cookie": [],
@@ -782,6 +782,18 @@
782782
"item": [
783783
{
784784
"name": "Login",
785+
"event": [
786+
{
787+
"listen": "test",
788+
"script": {
789+
"type": "text/javascript",
790+
"exec": [
791+
"var jsonData = JSON.parse(responseBody);",
792+
"postman.setEnvironmentVariable(\"auth\", \"Bearer \" + jsonData.sessionId);"
793+
]
794+
}
795+
}
796+
],
785797
"request": {
786798
"url": "https://{{li}}/api/v1/sessions",
787799
"method": "POST",
@@ -794,9 +806,9 @@
794806
],
795807
"body": {
796808
"mode": "raw",
797-
"raw": "{\n \"username\": \"admin\",\n \"password\": \"VMware1!\",\n \"provider\": \"Local\"\n}"
809+
"raw": "{\n \"username\": \"{{user}}\",\n \"password\": \"{{pass}}\",\n \"provider\": \"{{provider}}\"\n}"
798810
},
799-
"description": "Create a Session ID"
811+
"description": "Add test to populate current environment with bearer token"
800812
},
801813
"response": []
802814
},
@@ -1123,7 +1135,7 @@
11231135
},
11241136
"response": [
11251137
{
1126-
"id": "835e7fc1-5bea-4b5b-a427-fc6085c4b4e1",
1138+
"id": "43610183-6e06-4fbb-9806-701e85edf922",
11271139
"name": "Example - Version Reference: 4.0.0-1234567",
11281140
"originalRequest": {
11291141
"url": "https://{{li}}/api/v1/upgrades/4.0.0-1234567",
@@ -1138,19 +1150,20 @@
11381150
"body": {
11391151
"mode": "raw",
11401152
"raw": ""
1141-
}
1153+
},
1154+
"description": ""
11421155
},
11431156
"status": "OK",
11441157
"code": 200,
1145-
"_postman_previewlanguage": "",
1158+
"_postman_previewlanguage": "Text",
11461159
"_postman_previewtype": "parsed",
11471160
"header": [],
11481161
"cookie": [],
11491162
"responseTime": 0,
11501163
"body": ""
11511164
},
11521165
{
1153-
"id": "3e819ac9-67dc-4299-92bd-596ca83ab0de",
1166+
"id": "e077ea61-4ee3-4051-a7d4-c4d710f64a96",
11541167
"name": "Example - Version Reference: 4.0.0-1234567",
11551168
"originalRequest": {
11561169
"url": "https://{{li}}/api/v1/upgrades/4.0.0-1234567",
@@ -1165,11 +1178,12 @@
11651178
"body": {
11661179
"mode": "raw",
11671180
"raw": ""
1168-
}
1181+
},
1182+
"description": ""
11691183
},
11701184
"status": "OK",
11711185
"code": 200,
1172-
"_postman_previewlanguage": "",
1186+
"_postman_previewlanguage": "Text",
11731187
"_postman_previewtype": "parsed",
11741188
"header": [],
11751189
"cookie": [],
@@ -1198,7 +1212,7 @@
11981212
},
11991213
"response": [
12001214
{
1201-
"id": "02d1b164-f7a0-4388-96ed-1f74902aee7c",
1215+
"id": "0ccc5b5c-2565-4596-ba89-6b14e0bad342",
12021216
"name": "Example - Version Reference: 4.0.0-1234567",
12031217
"originalRequest": {
12041218
"url": "https://{{li}}/api/v1/upgrades/4.0.0-1234567/eula",
@@ -1213,11 +1227,12 @@
12131227
"body": {
12141228
"mode": "raw",
12151229
"raw": ""
1216-
}
1230+
},
1231+
"description": ""
12171232
},
12181233
"status": "OK",
12191234
"code": 200,
1220-
"_postman_previewlanguage": "",
1235+
"_postman_previewlanguage": "Text",
12211236
"_postman_previewtype": "parsed",
12221237
"header": [],
12231238
"cookie": [],

0 commit comments

Comments
 (0)