Skip to content

Commit f392971

Browse files
committed
test: Add Authentication to smoke tests
1 parent 9534d64 commit f392971

File tree

3 files changed

+117
-19
lines changed

3 files changed

+117
-19
lines changed

tests/smoke/Insomnia.json

Lines changed: 71 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"_type": "export",
33
"__export_format": 3,
4-
"__export_date": "2018-08-29T00:21:29.249Z",
4+
"__export_date": "2018-08-30T08:05:34.737Z",
55
"__export_source": "insomnia.desktop.app:v6.0.2",
66
"resources": [
77
{
@@ -76,6 +76,17 @@
7676
"parentId": "wrk_9cfba925c7dd488082f501ae049fc4a6",
7777
"_type": "request_group"
7878
},
79+
{
80+
"_id": "fld_a2c212badc6b4f78b04156052ccecdf9",
81+
"created": 1535615640643,
82+
"description": "",
83+
"environment": {},
84+
"metaSortKey": -1535615640643,
85+
"modified": 1535615640643,
86+
"name": "Authentication",
87+
"parentId": "wrk_9cfba925c7dd488082f501ae049fc4a6",
88+
"_type": "request_group"
89+
},
7990
{
8091
"_id": "env_bc3b744d499e4fd7a5619722fb11085b",
8192
"color": null,
@@ -116,7 +127,7 @@
116127
"isPrivate": false,
117128
"metaSortKey": -1535216840284,
118129
"method": "GET",
119-
"modified": 1535497897664,
130+
"modified": 1535615714815,
120131
"name": "Get all Actions",
121132
"parameters": [],
122133
"parentId": "fld_0851225d29904130adb40f22bd49c8db",
@@ -148,7 +159,7 @@
148159
"isPrivate": false,
149160
"metaSortKey": -1535216840234,
150161
"method": "POST",
151-
"modified": 1535502041038,
162+
"modified": 1535608425071,
152163
"name": "Create new Action",
153164
"parameters": [],
154165
"parentId": "fld_0851225d29904130adb40f22bd49c8db",
@@ -180,7 +191,7 @@
180191
"isPrivate": false,
181192
"metaSortKey": -1535216840209,
182193
"method": "PUT",
183-
"modified": 1535497215217,
194+
"modified": 1535509229212,
184195
"name": "Update existing Action",
185196
"parameters": [],
186197
"parentId": "fld_0851225d29904130adb40f22bd49c8db",
@@ -212,7 +223,7 @@
212223
"isPrivate": false,
213224
"metaSortKey": -1535216840046.5,
214225
"method": "DELETE",
215-
"modified": 1535497248732,
226+
"modified": 1535506117351,
216227
"name": "Delete existing Action",
217228
"parameters": [],
218229
"parentId": "fld_0851225d29904130adb40f22bd49c8db",
@@ -235,7 +246,7 @@
235246
"isPrivate": false,
236247
"metaSortKey": -1535216840146.5,
237248
"method": "PUT",
238-
"modified": 1535500977048,
249+
"modified": 1535509759114,
239250
"name": "Move existing Action to a List",
240251
"parameters": [],
241252
"parentId": "fld_0851225d29904130adb40f22bd49c8db",
@@ -258,7 +269,7 @@
258269
"isPrivate": false,
259270
"metaSortKey": -1535216840096.5,
260271
"method": "PUT",
261-
"modified": 1535502044054,
272+
"modified": 1535608434932,
262273
"name": "Assign existing Action to a Project",
263274
"parameters": [],
264275
"parentId": "fld_0851225d29904130adb40f22bd49c8db",
@@ -281,7 +292,7 @@
281292
"isPrivate": false,
282293
"metaSortKey": -1535221576968,
283294
"method": "GET",
284-
"modified": 1535500931499,
295+
"modified": 1535615600513,
285296
"name": "Get all Lists",
286297
"parameters": [],
287298
"parentId": "fld_f1a1cd8c83624efc812287ed6db06969",
@@ -313,7 +324,7 @@
313324
"isPrivate": false,
314325
"metaSortKey": -1535221576918,
315326
"method": "POST",
316-
"modified": 1535501001466,
327+
"modified": 1535509701375,
317328
"name": "Create new List",
318329
"parameters": [],
319330
"parentId": "fld_f1a1cd8c83624efc812287ed6db06969",
@@ -345,7 +356,7 @@
345356
"isPrivate": false,
346357
"metaSortKey": -1535221576868,
347358
"method": "PUT",
348-
"modified": 1535501004081,
359+
"modified": 1535509705759,
349360
"name": "Update existing List",
350361
"parameters": [],
351362
"parentId": "fld_f1a1cd8c83624efc812287ed6db06969",
@@ -377,7 +388,7 @@
377388
"isPrivate": false,
378389
"metaSortKey": -1535221576718,
379390
"method": "DELETE",
380-
"modified": 1535239317401,
391+
"modified": 1535506776165,
381392
"name": "Delete existing List",
382393
"parameters": [],
383394
"parentId": "fld_f1a1cd8c83624efc812287ed6db06969",
@@ -400,7 +411,7 @@
400411
"isPrivate": false,
401412
"metaSortKey": -1535221576768,
402413
"method": "GET",
403-
"modified": 1535500982779,
414+
"modified": 1535509763772,
404415
"name": "Get all Actions in a List",
405416
"parameters": [],
406417
"parentId": "fld_f1a1cd8c83624efc812287ed6db06969",
@@ -415,15 +426,20 @@
415426
},
416427
{
417428
"_id": "req_f4863631ef504dff94406e8a2c3dc472",
418-
"authentication": {},
429+
"authentication": {
430+
"disabled": true,
431+
"prefix": "",
432+
"token": "",
433+
"type": "bearer"
434+
},
419435
"body": {},
420436
"created": 1535227828810,
421437
"description": "",
422438
"headers": [],
423439
"isPrivate": false,
424440
"metaSortKey": -1535221576968,
425441
"method": "GET",
426-
"modified": 1535502023984,
442+
"modified": 1535616083903,
427443
"name": "Get all Projects",
428444
"parameters": [],
429445
"parentId": "fld_4922fc6179244f0988e9099e956a421e",
@@ -455,7 +471,7 @@
455471
"isPrivate": false,
456472
"metaSortKey": -1535221576918,
457473
"method": "POST",
458-
"modified": 1535501979539,
474+
"modified": 1535616067208,
459475
"name": "Create new Project",
460476
"parameters": [],
461477
"parentId": "fld_4922fc6179244f0988e9099e956a421e",
@@ -487,7 +503,7 @@
487503
"isPrivate": false,
488504
"metaSortKey": -1535221576868,
489505
"method": "PUT",
490-
"modified": 1535502071731,
506+
"modified": 1535509895740,
491507
"name": "Update existing Project",
492508
"parameters": [],
493509
"parentId": "fld_4922fc6179244f0988e9099e956a421e",
@@ -502,7 +518,11 @@
502518
},
503519
{
504520
"_id": "req_e60350b26c50478fb5230edde112b3be",
505-
"authentication": {},
521+
"authentication": {
522+
"prefix": "",
523+
"token": "",
524+
"type": "bearer"
525+
},
506526
"body": {
507527
"mimeType": "application/json",
508528
"text": ""
@@ -519,7 +539,7 @@
519539
"isPrivate": false,
520540
"metaSortKey": -1535221576718,
521541
"method": "DELETE",
522-
"modified": 1535502058798,
542+
"modified": 1535616077139,
523543
"name": "Delete existing Project",
524544
"parameters": [],
525545
"parentId": "fld_4922fc6179244f0988e9099e956a421e",
@@ -542,7 +562,7 @@
542562
"isPrivate": false,
543563
"metaSortKey": -1535221576768,
544564
"method": "GET",
545-
"modified": 1535502048888,
565+
"modified": 1535509924049,
546566
"name": "Get all Actions in a Project",
547567
"parameters": [],
548568
"parentId": "fld_4922fc6179244f0988e9099e956a421e",
@@ -554,6 +574,38 @@
554574
"settingStoreCookies": true,
555575
"url": "http://localhost:55555/api/projects/1/actions",
556576
"_type": "request"
577+
},
578+
{
579+
"_id": "req_9d549b4315854de4ab7b37eae827cf3e",
580+
"authentication": {},
581+
"body": {
582+
"mimeType": "application/json",
583+
"text": "{\n\t\"username\": \"user\",\n\t\"password\": \"user\"\n}"
584+
},
585+
"created": 1535615690162,
586+
"description": "",
587+
"headers": [
588+
{
589+
"id": "pair_8a6c15f1527f471db3177d717d789aa6",
590+
"name": "Content-Type",
591+
"value": "application/json"
592+
}
593+
],
594+
"isPrivate": false,
595+
"metaSortKey": -1535615690162,
596+
"method": "POST",
597+
"modified": 1535616314121,
598+
"name": "Get JWT token",
599+
"parameters": [],
600+
"parentId": "fld_a2c212badc6b4f78b04156052ccecdf9",
601+
"settingDisableRenderRequestBody": false,
602+
"settingEncodeUrl": true,
603+
"settingMaxTimelineDataSize": 1000,
604+
"settingRebuildPath": true,
605+
"settingSendCookies": true,
606+
"settingStoreCookies": true,
607+
"url": "http://localhost:55555/api/auth/token",
608+
"_type": "request"
557609
}
558610
]
559611
}

tests/smoke/PlainText.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
Authentication
2+
==============
3+
4+
POST http://localhost:55555/api/auth/token
5+
{
6+
"username": "user",
7+
"password": "user"
8+
}
9+
10+
11+
112
Actions
213
=======
314

tests/smoke/Postman.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,41 @@
55
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
66
},
77
"item": [
8+
{
9+
"name": "Authentication",
10+
"item": [
11+
{
12+
"name": "Get JWT bearer token",
13+
"request": {
14+
"method": "POST",
15+
"header": [
16+
{
17+
"key": "Content-Type",
18+
"value": "application/json"
19+
}
20+
],
21+
"body": {
22+
"mode": "raw",
23+
"raw": "{\r\n\t\"username\": \"user\",\r\n\t\"password\": \"user\"\r\n}"
24+
},
25+
"url": {
26+
"raw": "http://localhost:55555/api/auth/token",
27+
"protocol": "http",
28+
"host": [
29+
"localhost"
30+
],
31+
"port": "55555",
32+
"path": [
33+
"api",
34+
"auth",
35+
"token"
36+
]
37+
}
38+
},
39+
"response": []
40+
}
41+
]
42+
},
843
{
944
"name": "Actions",
1045
"item": [

0 commit comments

Comments
 (0)