diff --git a/doc/testing/postman/CAPIF.postman_collection.json b/doc/testing/postman/CAPIF.postman_collection.json index 400f773037cf73f744cbfae31556bf5d912ef4ab..f1ce8404dcf052e5c8677cd3df90d8eed1c1ebac 100644 --- a/doc/testing/postman/CAPIF.postman_collection.json +++ b/doc/testing/postman/CAPIF.postman_collection.json @@ -128,7 +128,7 @@ "", "setTimeout(() => {", " pm.sendRequest({", - " url: 'http://localhost:3000/write_ca',", + " url: 'http://'+ pm.environment.get(\"NODE_HOSTNAME\") + ':'+ pm.environment.get(\"NODE_PORT\")+'/write_ca',", " method: 'POST',", " header: 'Content-Type:application/json',", " encoding: 'binary',", @@ -226,7 +226,7 @@ "", " setTimeout(() => {", " pm.sendRequest({", - " url: 'http://localhost:3000/generate_csr',", + " url: 'http://'+ pm.environment.get(\"NODE_HOSTNAME\") + ':'+ pm.environment.get(\"NODE_PORT\")+'/generate_csr',", " method: 'POST',", " header: 'Content-Type:application/json',", " encoding: 'binary',", @@ -251,7 +251,8 @@ } ], "protocolProfileBehavior": { - "strictSSL": false + "strictSSL": false, + "protocolVersion": "auto" }, "request": { "auth": { @@ -283,12 +284,11 @@ } }, "url": { - "raw": "https://{{CAPIF_HOSTNAME}}:{{CAPIF_PORT}}/{{ONBOARDING_URL}}", + "raw": "https://{{CAPIF_HOSTNAME}}/{{ONBOARDING_URL}}", "protocol": "https", "host": [ "{{CAPIF_HOSTNAME}}" ], - "port": "{{CAPIF_PORT}}", "path": [ "{{ONBOARDING_URL}}" ] @@ -305,7 +305,7 @@ "exec": [ "setTimeout(() => {", " pm.sendRequest({", - " url: 'http://localhost:3000/write_cert',", + " url: 'http://'+ pm.environment.get(\"NODE_HOSTNAME\") + ':'+ pm.environment.get(\"NODE_PORT\")+'/write_cert',", " method: 'POST',", " header: 'Content-Type:application/json',", " encoding: 'binary',", @@ -329,6 +329,14 @@ "listen": "test", "script": { "exec": [ + "var res = JSON.parse(responseBody);", + "if (pm.response.code == 201){", + " ", + " pm.environment.set('API_ID', res.apiId);", + "", + "}", + "", + "", "" ], "type": "text/javascript", @@ -337,7 +345,8 @@ } ], "protocolProfileBehavior": { - "strictSSL": true + "strictSSL": true, + "protocolVersion": "auto" }, "request": { "auth": { @@ -354,7 +363,7 @@ ], "body": { "mode": "raw", - "raw": "\n{\n \"apiName\": \"hello_api_demo_v2\",\n \"aefProfiles\": [\n {\n \"aefId\": \"{{AEF_ID}}\",\n \"versions\": [\n {\n \"apiVersion\": \"v1\",\n \"expiry\": \"2021-11-30T10:32:02.004Z\",\n \"resources\": [\n {\n \"resourceName\": \"hello-endpoint\",\n \"commType\": \"REQUEST_RESPONSE\",\n \"uri\": \"/hello\",\n \"custOpName\": \"string\",\n \"operations\": [\n \"POST\"\n ],\n \"description\": \"Endpoint to receive a welcome message\"\n }\n ],\n \"custOperations\": [\n {\n \"commType\": \"REQUEST_RESPONSE\",\n \"custOpName\": \"string\",\n \"operations\": [\n \"POST\"\n ],\n \"description\": \"string\"\n }\n ]\n }\n ],\n \"protocol\": \"HTTP_1_1\",\n \"dataFormat\": \"JSON\",\n \"securityMethods\": [\"OAUTH\"],\n \"interfaceDescriptions\": [\n {\n \"ipv4Addr\": \"localhost\",\n \"port\": 8088,\n \"securityMethods\": [\"OAUTH\"]\n }\n ]\n }\n ],\n \"description\": \"Hello api services\",\n \"supportedFeatures\": \"fffff\",\n \"shareableInfo\": {\n \"isShareable\": true,\n \"capifProvDoms\": [\n \"string\"\n ]\n },\n \"serviceAPICategory\": \"string\",\n \"apiSuppFeats\": \"fffff\",\n \"pubApiPath\": {\n \"ccfIds\": [\n \"string\"\n ]\n },\n \"ccfId\": \"string\"\n }", + "raw": "\n{\n \"apiName\": \"hello_api_demo_v6\",\n \"aefProfiles\": [\n {\n \"aefId\": \"{{AEF_ID}}\",\n \"versions\": [\n {\n \"apiVersion\": \"v1\",\n \"expiry\": \"2021-11-30T10:32:02.004Z\",\n \"resources\": [\n {\n \"resourceName\": \"hello-endpoint\",\n \"commType\": \"REQUEST_RESPONSE\",\n \"uri\": \"/hello\",\n \"custOpName\": \"string\",\n \"operations\": [\n \"POST\"\n ],\n \"description\": \"Endpoint to receive a welcome message\"\n }\n ],\n \"custOperations\": [\n {\n \"commType\": \"REQUEST_RESPONSE\",\n \"custOpName\": \"string\",\n \"operations\": [\n \"POST\"\n ],\n \"description\": \"string\"\n }\n ]\n }\n ],\n \"protocol\": \"HTTP_1_1\",\n \"dataFormat\": \"JSON\",\n \"securityMethods\": [\"OAUTH\"],\n \"interfaceDescriptions\": [\n {\n \"ipv4Addr\": \"localhost\",\n \"port\": 8088,\n \"securityMethods\": [\"OAUTH\"]\n }\n ]\n }\n ],\n \"description\": \"Hello api services\",\n \"supportedFeatures\": \"fffff\",\n \"shareableInfo\": {\n \"isShareable\": true,\n \"capifProvDoms\": [\n \"string\"\n ]\n },\n \"serviceAPICategory\": \"string\",\n \"apiSuppFeats\": \"fffff\",\n \"pubApiPath\": {\n \"ccfIds\": [\n \"string\"\n ]\n },\n \"ccfId\": \"string\",\n \"apiStatus\": {\n \"aefIds\": []\n }\n }", "options": { "raw": { "language": "json" @@ -409,7 +418,7 @@ "", "setTimeout(() => {", " pm.sendRequest({", - " url: 'http://localhost:3000/generate_csr_invoker',", + " url: 'http://'+ pm.environment.get(\"NODE_HOSTNAME\") + ':'+ pm.environment.get(\"NODE_PORT\")+'/generate_csr_invoker',", " method: 'POST',", " header: 'Content-Type:application/json',", " encoding: 'binary',", @@ -487,7 +496,7 @@ "exec": [ "setTimeout(() => {", " pm.sendRequest({", - " url: 'http://localhost:3000/write_cert',", + " url: 'http://'+ pm.environment.get(\"NODE_HOSTNAME\") + ':'+ pm.environment.get(\"NODE_PORT\")+'/write_cert',", " method: 'POST',", " header: 'Content-Type:application/json',", " encoding: 'binary',", @@ -578,7 +587,7 @@ "exec": [ "setTimeout(() => {", " pm.sendRequest({", - " url: 'http://localhost:3000/write_cert',", + " url: 'http://'+ pm.environment.get(\"NODE_HOSTNAME\") + ':'+ pm.environment.get(\"NODE_PORT\")+'/write_cert',", " method: 'POST',", " header: 'Content-Type:application/json',", " encoding: 'binary',", @@ -660,7 +669,7 @@ "exec": [ "setTimeout(() => {", " pm.sendRequest({", - " url: 'http://localhost:3000/write_cert',", + " url: 'http://'+ pm.environment.get(\"NODE_HOSTNAME\") + ':'+ pm.environment.get(\"NODE_PORT\")+'/write_cert',", " method: 'POST',", " header: 'Content-Type:application/json',", " encoding: 'binary',", @@ -830,7 +839,7 @@ "exec": [ "setTimeout(() => {", " pm.sendRequest({", - " url: 'http://localhost:3000/write_cert',", + " url: 'http://'+ pm.environment.get(\"NODE_HOSTNAME\") + ':'+ pm.environment.get(\"NODE_PORT\")+'/write_cert',", " method: 'POST',", " header: 'Content-Type:application/json',", " encoding: 'binary',", @@ -881,7 +890,7 @@ "exec": [ "setTimeout(() => {", " pm.sendRequest({", - " url: 'http://localhost:3000/write_cert',", + " url: 'http://'+ pm.environment.get(\"NODE_HOSTNAME\") + ':'+ pm.environment.get(\"NODE_PORT\")+'/write_cert',", " method: 'POST',", " header: 'Content-Type:application/json',", " encoding: 'binary',", diff --git a/doc/testing/postman/CAPIF.postman_environment.json b/doc/testing/postman/CAPIF.postman_environment.json index 7d08cfa503506cbdaa6b452edba691625cd6e57f..d9e1e599be8c185aeff26f1cbc1e4e3a16903d6d 100644 --- a/doc/testing/postman/CAPIF.postman_environment.json +++ b/doc/testing/postman/CAPIF.postman_environment.json @@ -1,6 +1,6 @@ { - "id": "7111197e-e9c8-4988-a519-3284ab9021a9", - "name": "CAPIF", + "id": "adb492cf-1d02-4a7c-a4a2-00cb54c202f1", + "name": "CAPIF Copy", "values": [ { "key": "CAPIF_HOSTNAME", @@ -26,6 +26,18 @@ "type": "default", "enabled": true }, + { + "key": "NODE_HOSTNAME", + "value": "localhost", + "type": "default", + "enabled": true + }, + { + "key": "NODE_PORT", + "value": "3010", + "type": "default", + "enabled": true + }, { "key": "USERNAME", "value": "ProviderONE", @@ -262,6 +274,6 @@ } ], "_postman_variable_scope": "environment", - "_postman_exported_at": "2024-07-30T07:59:01.623Z", - "_postman_exported_using": "Postman/11.3.2" + "_postman_exported_at": "2024-10-07T09:27:29.742Z", + "_postman_exported_using": "Postman/11.12.0" } \ No newline at end of file diff --git a/doc/testing/postman/Postman-Test.zip b/doc/testing/postman/Postman-Test.zip index 41f2d883b35b29556fed958f017b78731158c423..a69a491dbf1aed153d6abe319d233828d33026a4 100644 Binary files a/doc/testing/postman/Postman-Test.zip and b/doc/testing/postman/Postman-Test.zip differ diff --git a/doc/testing/postman/script.js b/doc/testing/postman/script.js index 980f81f33b4bda4f48f55dcd13d8f436dface9a5..ce51eb0de2112f92552cab7e92186ad1d51d9af9 100644 --- a/doc/testing/postman/script.js +++ b/doc/testing/postman/script.js @@ -193,7 +193,7 @@ app.post('/write_ca', (req, res) => { }); }); -app.listen(3000, () => { - console.log('ResponsesToFile App is listening now! Send them requests my way!'); +app.listen(3010, () => { + console.log('Listener API running.'); console.log(`Data is being stored at location: ${path.join(process.cwd(), folderPath)}`); }); \ No newline at end of file