Skip to content

Commit 39ff420

Browse files
committed
Fixing failing tests by changing requests
1 parent d43d634 commit 39ff420

File tree

2 files changed

+13
-35
lines changed

2 files changed

+13
-35
lines changed

test/codegen/newman/fixtures/basicCollection.json

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"info": {
3-
"_postman_id": "f52ee07d-6345-4220-89af-e6696b3c0122",
3+
"_postman_id": "b303fb8b-9b21-4429-b00f-33b6a7efa186",
44
"name": "Basic Collection",
55
"description": "This collection contains requests that will be used to test validity of plugin created to convert postman request into code snippet of particular language.",
66
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
@@ -12,7 +12,6 @@
1212
{
1313
"listen": "test",
1414
"script": {
15-
"id": "34edbfa7-7d32-42d6-8397-af2378c3aaa4",
1615
"exec": [
1716
""
1817
],
@@ -53,7 +52,6 @@
5352
},
5453
{
5554
"name": "Request Headers",
56-
"event": [],
5755
"request": {
5856
"method": "GET",
5957
"header": [
@@ -95,7 +93,6 @@
9593
{
9694
"listen": "test",
9795
"script": {
98-
"id": "e150d55b-0273-430a-9e1d-11969b433734",
9996
"exec": [
10097
""
10198
],
@@ -141,7 +138,6 @@
141138
{
142139
"listen": "test",
143140
"script": {
144-
"id": "1bfe1fc3-c244-4a42-83c5-1a0d94d56ffd",
145141
"exec": [
146142
""
147143
],
@@ -188,7 +184,6 @@
188184
{
189185
"listen": "test",
190186
"script": {
191-
"id": "a3ddecd1-e89d-426d-995c-0d6a678caa91",
192187
"exec": [
193188
"var responseJSON;",
194189
"",
@@ -216,8 +211,7 @@
216211
"header": [
217212
{
218213
"key": "Content-Type",
219-
"value": "text/plain",
220-
"disabled": false
214+
"value": "text/plain"
221215
}
222216
],
223217
"body": {
@@ -245,7 +239,6 @@
245239
{
246240
"listen": "test",
247241
"script": {
248-
"id": "e926912d-1c99-4c54-9b53-91c8f63acef0",
249242
"exec": [
250243
""
251244
],
@@ -312,7 +305,6 @@
312305
{
313306
"listen": "test",
314307
"script": {
315-
"id": "d211bdad-60b3-4cd6-869f-853377bf03ef",
316308
"exec": [
317309
""
318310
],
@@ -353,7 +345,6 @@
353345
{
354346
"listen": "test",
355347
"script": {
356-
"id": "532fef57-48fd-4ffe-ac7e-f5a7e32facc2",
357348
"exec": [
358349
""
359350
],
@@ -394,7 +385,6 @@
394385
{
395386
"listen": "test",
396387
"script": {
397-
"id": "8bbbbc5b-2983-4979-8347-3ced95a69f7e",
398388
"exec": [
399389
""
400390
],
@@ -435,7 +425,6 @@
435425
{
436426
"listen": "test",
437427
"script": {
438-
"id": "48da0505-470f-4cf3-bb77-30665415af60",
439428
"exec": [
440429
""
441430
],
@@ -618,7 +607,6 @@
618607
{
619608
"listen": "test",
620609
"script": {
621-
"type": "text/javascript",
622610
"exec": [
623611
"var responseJSON;",
624612
"",
@@ -634,7 +622,8 @@
634622
"",
635623
"tests['response has PUT data'] = _.has(responseJSON, 'data');",
636624
"tests['response matches the data sent in request'] = (responseJSON.data && responseJSON.data.length === 256);"
637-
]
625+
],
626+
"type": "text/javascript"
638627
}
639628
}
640629
],
@@ -646,16 +635,15 @@
646635
"value": "text/plain"
647636
}
648637
],
649-
"body": {},
650638
"url": {
651-
"raw": "https://mockbin.org/request",
639+
"raw": "https://postman-echo.com/delete",
652640
"protocol": "https",
653641
"host": [
654-
"mockbin",
655-
"org"
642+
"postman-echo",
643+
"com"
656644
],
657645
"path": [
658-
"request"
646+
"delete"
659647
]
660648
},
661649
"description": "The HTTP `DELETE` method is used to delete resources on a server. The exact\nuse of `DELETE` requests depends on the server implementation. In general, \n`DELETE` requests support both, Query String parameters as well as a Request \nBody.\n\nThis endpoint accepts an HTTP `DELETE` request and provides debug information\nsuch as the HTTP headers, Query String arguments, and the Request Body."
@@ -667,7 +655,6 @@
667655
{
668656
"listen": "prerequest",
669657
"script": {
670-
"id": "e80b6162-6c90-4150-bfa1-7f42f11c8f64",
671658
"type": "text/javascript",
672659
"exec": [
673660
""
@@ -677,12 +664,11 @@
677664
{
678665
"listen": "test",
679666
"script": {
680-
"id": "538efa04-97ce-456c-a5a1-772c466591d5",
681667
"type": "text/javascript",
682668
"exec": [
683669
""
684670
]
685671
}
686672
}
687673
]
688-
}
674+
}

test/codegen/newman/fixtures/redirectCollection.json

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"info": {
3-
"_postman_id": "3ef1c00f-c58f-4604-8419-7a4931958235",
3+
"_postman_id": "17d62db7-ca12-4298-8782-1d6f018c7be2",
44
"name": "Redirect test",
55
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
66
},
@@ -11,23 +11,15 @@
1111
"method": "GET",
1212
"header": [],
1313
"url": {
14-
"raw": "https://mockbin.org/redirect/302/1/?to=https://postman-echo.com/get",
14+
"raw": "https://httpbin.org/redirect/1",
1515
"protocol": "https",
1616
"host": [
17-
"mockbin",
17+
"httpbin",
1818
"org"
1919
],
2020
"path": [
2121
"redirect",
22-
"302",
23-
"1",
24-
""
25-
],
26-
"query": [
27-
{
28-
"key": "to",
29-
"value": "https://postman-echo.com/get"
30-
}
22+
"1"
3123
]
3224
}
3325
},

0 commit comments

Comments
 (0)