Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unit tests #736

Merged
merged 10 commits into from
May 1, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -648,11 +648,11 @@
],
"body": {},
"url": {
"raw": "https://mockbin.org/request",
"raw": "https://postman-echo.com/request",
"protocol": "https",
"host": [
"mockbin",
"org"
"postman-echo",
"com"
],
"path": [
"request"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1098,13 +1098,11 @@
"raw": ""
},
"url": {
"raw": "https://704c30e8-77fe-4dc4-93e2-9c9c68dfb4e1.mock.pstmn.io/link",
"raw": "https://postman-echo.com/link",
"protocol": "https",
"host": [
"704c30e8-77fe-4dc4-93e2-9c9c68dfb4e1",
"mock",
"pstmn",
"io"
"postman-echo",
"com"
],
"path": [
"link"
Expand All @@ -1128,13 +1126,11 @@
"raw": ""
},
"url": {
"raw": "https://704c30e8-77fe-4dc4-93e2-9c9c68dfb4e1.mock.pstmn.io/unlick",
"raw": "https://postman-echo.com/unlick",
"protocol": "https",
"host": [
"704c30e8-77fe-4dc4-93e2-9c9c68dfb4e1",
"mock",
"pstmn",
"io"
"postman-echo",
"com"
],
"path": [
"unlick"
Expand All @@ -1158,13 +1154,11 @@
"raw": ""
},
"url": {
"raw": "https://704c30e8-77fe-4dc4-93e2-9c9c68dfb4e1.mock.pstmn.io/lock",
"raw": "https://postman-echo.com/lock",
"protocol": "https",
"host": [
"704c30e8-77fe-4dc4-93e2-9c9c68dfb4e1",
"mock",
"pstmn",
"io"
"postman-echo",
"com"
],
"path": [
"lock"
Expand All @@ -1180,13 +1174,11 @@
"header": [],
"body": {},
"url": {
"raw": "https://704c30e8-77fe-4dc4-93e2-9c9c68dfb4e1.mock.pstmn.io/unlock",
"raw": "https://postman-echo.com/unlock",
"protocol": "https",
"host": [
"704c30e8-77fe-4dc4-93e2-9c9c68dfb4e1",
"mock",
"pstmn",
"io"
"postman-echo",
"com"
],
"path": [
"unlock"
Expand All @@ -1210,13 +1202,11 @@
"raw": ""
},
"url": {
"raw": "https://704c30e8-77fe-4dc4-93e2-9c9c68dfb4e1.mock.pstmn.io/profind",
"raw": "https://postman-echo.com/profind",
"protocol": "https",
"host": [
"704c30e8-77fe-4dc4-93e2-9c9c68dfb4e1",
"mock",
"pstmn",
"io"
"postman-echo",
"com"
],
"path": [
"profind"
Expand All @@ -1240,13 +1230,11 @@
"raw": ""
},
"url": {
"raw": "https://704c30e8-77fe-4dc4-93e2-9c9c68dfb4e1.mock.pstmn.io/view",
"raw": "https://postman-echo.com/view",
"protocol": "https",
"host": [
"704c30e8-77fe-4dc4-93e2-9c9c68dfb4e1",
"mock",
"pstmn",
"io"
"postman-echo",
"com"
],
"path": [
"view"
Expand All @@ -1262,13 +1250,11 @@
"header": [],
"body": {},
"url": {
"raw": "https://704c30e8-77fe-4dc4-93e2-9c9c68dfb4e1.mock.pstmn.io/view",
"raw": "https://postman-echo.com/view",
"protocol": "https",
"host": [
"704c30e8-77fe-4dc4-93e2-9c9c68dfb4e1",
"mock",
"pstmn",
"io"
"postman-echo",
"com"
],
"path": [
"view"
Expand All @@ -1284,13 +1270,11 @@
"header": [],
"body": {},
"url": {
"raw": "https://9c76407d-5b8d-4b22-99fb-8c47a85d9848.mock.pstmn.io",
"raw": "https://postman-echo.com",
"protocol": "https",
"host": [
"9c76407d-5b8d-4b22-99fb-8c47a85d9848",
"mock",
"pstmn",
"io"
"postman-echo",
"com"
]
}
},
Expand Down Expand Up @@ -1378,7 +1362,7 @@
}
],
"cookie": [],
"body": "{\n \"args\": {},\n \"data\": \"Curabitur auctor, elit nec pulvinar porttitor, ex augue condimentum enim, eget suscipit urna felis quis neque.\\nSuspendisse sit amet luctus massa, nec venenatis mi. Suspendisse tincidunt massa at nibh efficitur fringilla. Nam quis congue mi. Etiam volutpat.\",\n \"files\": {},\n \"form\": {},\n \"headers\": {\n \"host\": \"postman-echo.com\",\n \"content-length\": \"256\",\n \"accept\": \"*/*\",\n \"accept-encoding\": \"gzip, deflate\",\n \"content-type\": \"text/plain\",\n \"cookie\": \"sails.sid=s%3A1wOi4AdoZEbqBjGi6oSUC5Vlfje8wJvs.DHQfRLXfIBvZ%2Bv0KhLAThMDz%2FXvxh9gyxWYa0u1EZOU\",\n \"user-agent\": \"PostmanRuntime/7.1.1\",\n \"x-forwarded-port\": \"443\",\n \"x-forwarded-proto\": \"https\"\n },\n \"json\": null,\n \"url\": \"https://9c76407d-5b8d-4b22-99fb-8c47a85d9848.mock.pstmn.io\"\n}"
"body": "{\n \"args\": {},\n \"data\": \"Curabitur auctor, elit nec pulvinar porttitor, ex augue condimentum enim, eget suscipit urna felis quis neque.\\nSuspendisse sit amet luctus massa, nec venenatis mi. Suspendisse tincidunt massa at nibh efficitur fringilla. Nam quis congue mi. Etiam volutpat.\",\n \"files\": {},\n \"form\": {},\n \"headers\": {\n \"host\": \"postman-echo.com\",\n \"content-length\": \"256\",\n \"accept\": \"*/*\",\n \"accept-encoding\": \"gzip, deflate\",\n \"content-type\": \"text/plain\",\n \"cookie\": \"sails.sid=s%3A1wOi4AdoZEbqBjGi6oSUC5Vlfje8wJvs.DHQfRLXfIBvZ%2Bv0KhLAThMDz%2FXvxh9gyxWYa0u1EZOU\",\n \"user-agent\": \"PostmanRuntime/7.1.1\",\n \"x-forwarded-port\": \"443\",\n \"x-forwarded-proto\": \"https\"\n },\n \"json\": null,\n \"url\": \"https://postman-echo.com\"\n}"
}
]
},
Expand All @@ -1389,13 +1373,11 @@
"header": [],
"body": {},
"url": {
"raw": "https://704c30e8-77fe-4dc4-93e2-9c9c68dfb4e1.mock.pstmn.io/copy",
"raw": "https://postman-echo.com/copy",
"protocol": "https",
"host": [
"704c30e8-77fe-4dc4-93e2-9c9c68dfb4e1",
"mock",
"pstmn",
"io"
"postman-echo",
"com"
],
"path": [
"copy"
Expand All @@ -1411,11 +1393,11 @@
"header": [],
"body": {},
"url": {
"raw": "https://mockbin.org/request",
"raw": "https://postman-echo.com/request",
"protocol": "https",
"host": [
"mockbin",
"org"
"postman-echo",
"com"
],
"path": [
"request"
Expand Down Expand Up @@ -1527,14 +1509,14 @@
{
"expires": "Thu Mar 14 2019 13:12:10 GMT+0530 (IST)",
"httpOnly": true,
"domain": "mockbin.org",
"domain": "postman-echo.com",
"path": "/",
"secure": false,
"value": "dfb94a3e1f3f8a9956138e4896847caf21521013330",
"key": "__cfduid"
}
],
"body": "{\n \"startedDateTime\": \"2018-03-14T09:06:37.443Z\",\n \"clientIPAddress\": \"106.51.70.154\",\n \"method\": \"COPY\",\n \"url\": \"https://mockbin.org/request\",\n \"httpVersion\": \"HTTP/1.1\",\n \"cookies\": {\n \"__cfduid\": \"dfb94a3e1f3f8a9956138e4896847caf21521013330\"\n },\n \"headers\": {\n \"host\": \"mockbin.org\",\n \"connection\": \"close\",\n \"accept-encoding\": \"gzip\",\n \"x-forwarded-for\": \"106.51.70.154, 172.68.255.127\",\n \"cf-ray\": \"3fb595d5facaa302-HKG\",\n \"x-forwarded-proto\": \"http\",\n \"cf-visitor\": \"{\\\"scheme\\\":\\\"https\\\"}\",\n \"cache-control\": \"no-cache\",\n \"postman-token\": \"8d5b9832-75df-432f-90a3-284dacef0478\",\n \"user-agent\": \"PostmanRuntime/7.1.1\",\n \"accept\": \"*/*\",\n \"cookie\": \"__cfduid=dfb94a3e1f3f8a9956138e4896847caf21521013330\",\n \"cf-connecting-ip\": \"106.51.70.154\",\n \"x-request-id\": \"0e41473d-5130-4a6e-968d-b2a16cda3364\",\n \"x-forwarded-port\": \"80\",\n \"via\": \"1.1 vegur\",\n \"connect-time\": \"2\",\n \"x-request-start\": \"1521018397437\",\n \"total-route-time\": \"0\",\n \"content-length\": \"0\"\n },\n \"queryString\": {},\n \"postData\": {\n \"mimeType\": \"application/octet-stream\",\n \"text\": \"\",\n \"params\": []\n },\n \"headersSize\": 637,\n \"bodySize\": 0\n}"
"body": "{\n \"startedDateTime\": \"2018-03-14T09:06:37.443Z\",\n \"clientIPAddress\": \"106.51.70.154\",\n \"method\": \"COPY\",\n \"url\": \"https://postman-echo.com/request\",\n \"httpVersion\": \"HTTP/1.1\",\n \"cookies\": {\n \"__cfduid\": \"dfb94a3e1f3f8a9956138e4896847caf21521013330\"\n },\n \"headers\": {\n \"host\": \"postman-echo.com\",\n \"connection\": \"close\",\n \"accept-encoding\": \"gzip\",\n \"x-forwarded-for\": \"106.51.70.154, 172.68.255.127\",\n \"cf-ray\": \"3fb595d5facaa302-HKG\",\n \"x-forwarded-proto\": \"http\",\n \"cf-visitor\": \"{\\\"scheme\\\":\\\"https\\\"}\",\n \"cache-control\": \"no-cache\",\n \"postman-token\": \"8d5b9832-75df-432f-90a3-284dacef0478\",\n \"user-agent\": \"PostmanRuntime/7.1.1\",\n \"accept\": \"*/*\",\n \"cookie\": \"__cfduid=dfb94a3e1f3f8a9956138e4896847caf21521013330\",\n \"cf-connecting-ip\": \"106.51.70.154\",\n \"x-request-id\": \"0e41473d-5130-4a6e-968d-b2a16cda3364\",\n \"x-forwarded-port\": \"80\",\n \"via\": \"1.1 vegur\",\n \"connect-time\": \"2\",\n \"x-request-start\": \"1521018397437\",\n \"total-route-time\": \"0\",\n \"content-length\": \"0\"\n },\n \"queryString\": {},\n \"postData\": {\n \"mimeType\": \"application/octet-stream\",\n \"text\": \"\",\n \"params\": []\n },\n \"headersSize\": 637,\n \"bodySize\": 0\n}"
}
]
}
Expand Down
70 changes: 33 additions & 37 deletions codegens/curl/test/unit/fixtures/testcollection/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -1021,11 +1021,11 @@
"raw": ""
},
"url": {
"raw": "https://mockbin.org/request",
"raw": "https://postman-echo.com/request",
"protocol": "https",
"host": [
"mockbin",
"org"
"postman-echo",
"com"
],
"path": [
"request"
Expand All @@ -1050,11 +1050,11 @@
"raw": ""
},
"url": {
"raw": "https://mockbin.org/request",
"raw": "https://postman-echo.com/request",
"protocol": "https",
"host": [
"mockbin",
"org"
"postman-echo",
"com"
],
"path": [
"request"
Expand All @@ -1079,11 +1079,11 @@
"raw": ""
},
"url": {
"raw": "https://mockbin.org/request",
"raw": "https://postman-echo.com/request",
"protocol": "https",
"host": [
"mockbin",
"org"
"postman-echo",
"com"
],
"path": [
"request"
Expand All @@ -1100,11 +1100,11 @@
"header": [],
"body": {},
"url": {
"raw": "https://mockbin.org/request",
"raw": "https://postman-echo.com/request",
"protocol": "https",
"host": [
"mockbin",
"org"
"postman-echo",
"com"
],
"path": [
"request"
Expand All @@ -1129,11 +1129,11 @@
"raw": ""
},
"url": {
"raw": "https://mockbin.org/request",
"raw": "https://postman-echo.com/request",
"protocol": "https",
"host": [
"mockbin",
"org"
"postman-echo",
"com"
],
"path": [
"request"
Expand All @@ -1158,11 +1158,11 @@
"raw": ""
},
"url": {
"raw": "https://mockbin.org/request",
"raw": "https://postman-echo.com/request",
"protocol": "https",
"host": [
"mockbin",
"org"
"postman-echo",
"com"
],
"path": [
"request"
Expand All @@ -1179,13 +1179,11 @@
"header": [],
"body": {},
"url": {
"raw": "https://9c76407d-5b8d-4b22-99fb-8c47a85d9848.mock.pstmn.io",
"raw": "https://postman-echo.com",
"protocol": "https",
"host": [
"9c76407d-5b8d-4b22-99fb-8c47a85d9848",
"mock",
"pstmn",
"io"
"postman-echo",
"com"
]
},
"description": null
Expand All @@ -1199,13 +1197,11 @@
"header": [],
"body": {},
"url": {
"raw": "https://9c76407d-5b8d-4b22-99fb-8c47a85d9848.mock.pstmn.io",
"raw": "https://postman-echo.com",
"protocol": "https",
"host": [
"9c76407d-5b8d-4b22-99fb-8c47a85d9848",
"mock",
"pstmn",
"io"
"postman-echo",
"com"
]
}
},
Expand Down Expand Up @@ -1294,7 +1290,7 @@
],
"cookie": [],
"responseTime": "375",
"body": "{\n \"args\": {},\n \"data\": \"Curabitur auctor, elit nec pulvinar porttitor, ex augue condimentum enim, eget suscipit urna felis quis neque.\\nSuspendisse sit amet luctus massa, nec venenatis mi. Suspendisse tincidunt massa at nibh efficitur fringilla. Nam quis congue mi. Etiam volutpat.\",\n \"files\": {},\n \"form\": {},\n \"headers\": {\n \"host\": \"postman-echo.com\",\n \"content-length\": \"256\",\n \"accept\": \"*/*\",\n \"accept-encoding\": \"gzip, deflate\",\n \"content-type\": \"text/plain\",\n \"cookie\": \"sails.sid=s%3A1wOi4AdoZEbqBjGi6oSUC5Vlfje8wJvs.DHQfRLXfIBvZ%2Bv0KhLAThMDz%2FXvxh9gyxWYa0u1EZOU\",\n \"user-agent\": \"PostmanRuntime/7.1.1\",\n \"x-forwarded-port\": \"443\",\n \"x-forwarded-proto\": \"https\"\n },\n \"json\": null,\n \"url\": \"https://9c76407d-5b8d-4b22-99fb-8c47a85d9848.mock.pstmn.io\"\n}"
"body": "{\n \"args\": {},\n \"data\": \"Curabitur auctor, elit nec pulvinar porttitor, ex augue condimentum enim, eget suscipit urna felis quis neque.\\nSuspendisse sit amet luctus massa, nec venenatis mi. Suspendisse tincidunt massa at nibh efficitur fringilla. Nam quis congue mi. Etiam volutpat.\",\n \"files\": {},\n \"form\": {},\n \"headers\": {\n \"host\": \"postman-echo.com\",\n \"content-length\": \"256\",\n \"accept\": \"*/*\",\n \"accept-encoding\": \"gzip, deflate\",\n \"content-type\": \"text/plain\",\n \"cookie\": \"sails.sid=s%3A1wOi4AdoZEbqBjGi6oSUC5Vlfje8wJvs.DHQfRLXfIBvZ%2Bv0KhLAThMDz%2FXvxh9gyxWYa0u1EZOU\",\n \"user-agent\": \"PostmanRuntime/7.1.1\",\n \"x-forwarded-port\": \"443\",\n \"x-forwarded-proto\": \"https\"\n },\n \"json\": null,\n \"url\": \"https://postman-echo.com\"\n}"
}
]
},
Expand All @@ -1305,11 +1301,11 @@
"header": [],
"body": {},
"url": {
"raw": "https://mockbin.org/request",
"raw": "https://postman-echo.com/request",
"protocol": "https",
"host": [
"mockbin",
"org"
"postman-echo",
"com"
],
"path": [
"request"
Expand All @@ -1326,11 +1322,11 @@
"header": [],
"body": {},
"url": {
"raw": "https://mockbin.org/request",
"raw": "https://postman-echo.com/request",
"protocol": "https",
"host": [
"mockbin",
"org"
"postman-echo",
"com"
],
"path": [
"request"
Expand Down Expand Up @@ -1442,14 +1438,14 @@
{
"expires": "Thu Mar 14 2019 13:12:10 GMT+0530 (IST)",
"httpOnly": true,
"domain": "mockbin.org",
"domain": "postman-echo.com",
"path": "/",
"secure": false,
"value": "dfb94a3e1f3f8a9956138e4896847caf21521013330",
"key": "__cfduid"
}
],
"body": "{\n \"startedDateTime\": \"2018-03-14T09:06:37.443Z\",\n \"clientIPAddress\": \"106.51.70.154\",\n \"method\": \"COPY\",\n \"url\": \"https://mockbin.org/request\",\n \"httpVersion\": \"HTTP/1.1\",\n \"cookies\": {\n \"__cfduid\": \"dfb94a3e1f3f8a9956138e4896847caf21521013330\"\n },\n \"headers\": {\n \"host\": \"mockbin.org\",\n \"connection\": \"close\",\n \"accept-encoding\": \"gzip\",\n \"x-forwarded-for\": \"106.51.70.154, 172.68.255.127\",\n \"cf-ray\": \"3fb595d5facaa302-HKG\",\n \"x-forwarded-proto\": \"http\",\n \"cf-visitor\": \"{\\\"scheme\\\":\\\"https\\\"}\",\n \"cache-control\": \"no-cache\",\n \"postman-token\": \"8d5b9832-75df-432f-90a3-284dacef0478\",\n \"user-agent\": \"PostmanRuntime/7.1.1\",\n \"accept\": \"*/*\",\n \"cookie\": \"__cfduid=dfb94a3e1f3f8a9956138e4896847caf21521013330\",\n \"cf-connecting-ip\": \"106.51.70.154\",\n \"x-request-id\": \"0e41473d-5130-4a6e-968d-b2a16cda3364\",\n \"x-forwarded-port\": \"80\",\n \"via\": \"1.1 vegur\",\n \"connect-time\": \"2\",\n \"x-request-start\": \"1521018397437\",\n \"total-route-time\": \"0\",\n \"content-length\": \"0\"\n },\n \"queryString\": {},\n \"postData\": {\n \"mimeType\": \"application/octet-stream\",\n \"text\": \"\",\n \"params\": []\n },\n \"headersSize\": 637,\n \"bodySize\": 0\n}"
"body": "{\n \"startedDateTime\": \"2018-03-14T09:06:37.443Z\",\n \"clientIPAddress\": \"106.51.70.154\",\n \"method\": \"COPY\",\n \"url\": \"https://postman-echo.com/request\",\n \"httpVersion\": \"HTTP/1.1\",\n \"cookies\": {\n \"__cfduid\": \"dfb94a3e1f3f8a9956138e4896847caf21521013330\"\n },\n \"headers\": {\n \"host\": \"postman-echo.com\",\n \"connection\": \"close\",\n \"accept-encoding\": \"gzip\",\n \"x-forwarded-for\": \"106.51.70.154, 172.68.255.127\",\n \"cf-ray\": \"3fb595d5facaa302-HKG\",\n \"x-forwarded-proto\": \"http\",\n \"cf-visitor\": \"{\\\"scheme\\\":\\\"https\\\"}\",\n \"cache-control\": \"no-cache\",\n \"postman-token\": \"8d5b9832-75df-432f-90a3-284dacef0478\",\n \"user-agent\": \"PostmanRuntime/7.1.1\",\n \"accept\": \"*/*\",\n \"cookie\": \"__cfduid=dfb94a3e1f3f8a9956138e4896847caf21521013330\",\n \"cf-connecting-ip\": \"106.51.70.154\",\n \"x-request-id\": \"0e41473d-5130-4a6e-968d-b2a16cda3364\",\n \"x-forwarded-port\": \"80\",\n \"via\": \"1.1 vegur\",\n \"connect-time\": \"2\",\n \"x-request-start\": \"1521018397437\",\n \"total-route-time\": \"0\",\n \"content-length\": \"0\"\n },\n \"queryString\": {},\n \"postData\": {\n \"mimeType\": \"application/octet-stream\",\n \"text\": \"\",\n \"params\": []\n },\n \"headersSize\": 637,\n \"bodySize\": 0\n}"
}
]
}
Expand Down