Skip to content

Commit

Permalink
Fixing failing tests by changing requests
Browse files Browse the repository at this point in the history
  • Loading branch information
aman-v-singh committed Jan 18, 2024
1 parent d43d634 commit 39ff420
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 35 deletions.
32 changes: 9 additions & 23 deletions test/codegen/newman/fixtures/basicCollection.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info": {
"_postman_id": "f52ee07d-6345-4220-89af-e6696b3c0122",
"_postman_id": "b303fb8b-9b21-4429-b00f-33b6a7efa186",
"name": "Basic Collection",
"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.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
Expand All @@ -12,7 +12,6 @@
{
"listen": "test",
"script": {
"id": "34edbfa7-7d32-42d6-8397-af2378c3aaa4",
"exec": [
""
],
Expand Down Expand Up @@ -53,7 +52,6 @@
},
{
"name": "Request Headers",
"event": [],
"request": {
"method": "GET",
"header": [
Expand Down Expand Up @@ -95,7 +93,6 @@
{
"listen": "test",
"script": {
"id": "e150d55b-0273-430a-9e1d-11969b433734",
"exec": [
""
],
Expand Down Expand Up @@ -141,7 +138,6 @@
{
"listen": "test",
"script": {
"id": "1bfe1fc3-c244-4a42-83c5-1a0d94d56ffd",
"exec": [
""
],
Expand Down Expand Up @@ -188,7 +184,6 @@
{
"listen": "test",
"script": {
"id": "a3ddecd1-e89d-426d-995c-0d6a678caa91",
"exec": [
"var responseJSON;",
"",
Expand Down Expand Up @@ -216,8 +211,7 @@
"header": [
{
"key": "Content-Type",
"value": "text/plain",
"disabled": false
"value": "text/plain"
}
],
"body": {
Expand Down Expand Up @@ -245,7 +239,6 @@
{
"listen": "test",
"script": {
"id": "e926912d-1c99-4c54-9b53-91c8f63acef0",
"exec": [
""
],
Expand Down Expand Up @@ -312,7 +305,6 @@
{
"listen": "test",
"script": {
"id": "d211bdad-60b3-4cd6-869f-853377bf03ef",
"exec": [
""
],
Expand Down Expand Up @@ -353,7 +345,6 @@
{
"listen": "test",
"script": {
"id": "532fef57-48fd-4ffe-ac7e-f5a7e32facc2",
"exec": [
""
],
Expand Down Expand Up @@ -394,7 +385,6 @@
{
"listen": "test",
"script": {
"id": "8bbbbc5b-2983-4979-8347-3ced95a69f7e",
"exec": [
""
],
Expand Down Expand Up @@ -435,7 +425,6 @@
{
"listen": "test",
"script": {
"id": "48da0505-470f-4cf3-bb77-30665415af60",
"exec": [
""
],
Expand Down Expand Up @@ -618,7 +607,6 @@
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"var responseJSON;",
"",
Expand All @@ -634,7 +622,8 @@
"",
"tests['response has PUT data'] = _.has(responseJSON, 'data');",
"tests['response matches the data sent in request'] = (responseJSON.data && responseJSON.data.length === 256);"
]
],
"type": "text/javascript"
}
}
],
Expand All @@ -646,16 +635,15 @@
"value": "text/plain"
}
],
"body": {},
"url": {
"raw": "https://mockbin.org/request",
"raw": "https://postman-echo.com/delete",
"protocol": "https",
"host": [
"mockbin",
"org"
"postman-echo",
"com"
],
"path": [
"request"
"delete"
]
},
"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."
Expand All @@ -667,7 +655,6 @@
{
"listen": "prerequest",
"script": {
"id": "e80b6162-6c90-4150-bfa1-7f42f11c8f64",
"type": "text/javascript",
"exec": [
""
Expand All @@ -677,12 +664,11 @@
{
"listen": "test",
"script": {
"id": "538efa04-97ce-456c-a5a1-772c466591d5",
"type": "text/javascript",
"exec": [
""
]
}
}
]
}
}
16 changes: 4 additions & 12 deletions test/codegen/newman/fixtures/redirectCollection.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info": {
"_postman_id": "3ef1c00f-c58f-4604-8419-7a4931958235",
"_postman_id": "17d62db7-ca12-4298-8782-1d6f018c7be2",
"name": "Redirect test",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
Expand All @@ -11,23 +11,15 @@
"method": "GET",
"header": [],
"url": {
"raw": "https://mockbin.org/redirect/302/1/?to=https://postman-echo.com/get",
"raw": "https://httpbin.org/redirect/1",
"protocol": "https",
"host": [
"mockbin",
"httpbin",
"org"
],
"path": [
"redirect",
"302",
"1",
""
],
"query": [
{
"key": "to",
"value": "https://postman-echo.com/get"
}
"1"
]
}
},
Expand Down

0 comments on commit 39ff420

Please sign in to comment.