From d4ebfd87522bb9b661a0e929cb4011c387be937b Mon Sep 17 00:00:00 2001 From: doufenghu Date: Tue, 23 Apr 2024 18:02:11 +0800 Subject: [PATCH] support multi-datacenter deployment --- 24.02/tsg_olap_e2e_test/collection.json | 189 ++++++++++++++++++----- 24.02/tsg_olap_e2e_test/environment.json | 24 ++- 2 files changed, 172 insertions(+), 41 deletions(-) diff --git a/24.02/tsg_olap_e2e_test/collection.json b/24.02/tsg_olap_e2e_test/collection.json index 46a981a..8730f2b 100644 --- a/24.02/tsg_olap_e2e_test/collection.json +++ b/24.02/tsg_olap_e2e_test/collection.json @@ -896,7 +896,7 @@ "name": "files", "item": [ { - "name": "packet_capture_file_test", + "name": "monitor_packet_capture_file_test", "event": [ { "listen": "test", @@ -904,9 +904,6 @@ "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.not.be.error;", - " pm.response.to.be.json;", - " const responseJson = pm.response.json();", - " pm.expect(responseJson.data[0].fileName).to.be.not.null;", "});", "", "", @@ -931,7 +928,7 @@ "disableBodyPruning": true }, "request": { - "method": "GET", + "method": "HEAD", "header": [ { "key": "Content-Type", @@ -944,14 +941,13 @@ "urlencoded": [] }, "url": { - "raw": "http://{{qgw_ip}}:{{qgw_port}}/v1/hos/traffic_file_bucket/123e4567-e89b-12d3-a456-426614174001", + "raw": "http://{{hos_ip}}:{{hos_port}}/hos/traffic_file_bucket/123e4567-e89b-12d3-a456-426614174001", "protocol": "http", "host": [ - "{{qgw_ip}}" + "{{hos_ip}}" ], - "port": "{{qgw_port}}", + "port": "{{hos_port}}", "path": [ - "v1", "hos", "traffic_file_bucket", "123e4567-e89b-12d3-a456-426614174001" @@ -969,9 +965,6 @@ "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.not.be.error;", - " pm.response.to.be.json;", - " const responseJson = pm.response.json();", - " pm.expect(responseJson.data[0].fileName).to.be.not.null;", "});", "", "", @@ -996,7 +989,7 @@ "disableBodyPruning": true }, "request": { - "method": "GET", + "method": "HEAD", "header": [ { "key": "Content-Type", @@ -1009,14 +1002,13 @@ "urlencoded": [] }, "url": { - "raw": "http://{{qgw_ip}}:{{qgw_port}}/v1/hos/traffic_file_bucket/123e4567-e89b-12d3-a456-426614174002", + "raw": "http://{{hos_ip}}:{{hos_port}}/hos/traffic_file_bucket/123e4567-e89b-12d3-a456-426614174002", "protocol": "http", "host": [ - "{{qgw_ip}}" + "{{hos_ip}}" ], - "port": "{{qgw_port}}", + "port": "{{hos_port}}", "path": [ - "v1", "hos", "traffic_file_bucket", "123e4567-e89b-12d3-a456-426614174002" @@ -1034,9 +1026,6 @@ "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.not.be.error;", - " pm.response.to.be.json;", - " const responseJson = pm.response.json();", - " pm.expect(responseJson.data[0].fileName).to.be.not.null;", "});", "", "", @@ -1061,7 +1050,7 @@ "disableBodyPruning": true }, "request": { - "method": "GET", + "method": "HEAD", "header": [ { "key": "Content-Type", @@ -1074,14 +1063,13 @@ "urlencoded": [] }, "url": { - "raw": "http://{{qgw_ip}}:{{qgw_port}}/v1/hos/traffic_file_bucket/123e4567-e89b-12d3-a456-426614174003", + "raw": "http://{{hos_ip}}:{{hos_port}}/hos/traffic_file_bucket/123e4567-e89b-12d3-a456-426614174003", "protocol": "http", "host": [ - "{{qgw_ip}}" + "{{hos_ip}}" ], - "port": "{{qgw_port}}", + "port": "{{hos_port}}", "path": [ - "v1", "hos", "traffic_file_bucket", "123e4567-e89b-12d3-a456-426614174003" @@ -1099,9 +1087,6 @@ "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.not.be.error;", - " pm.response.to.be.json;", - " const responseJson = pm.response.json();", - " pm.expect(responseJson.data[0].fileName).to.be.not.null;", "});", "", "", @@ -1126,7 +1111,7 @@ "disableBodyPruning": true }, "request": { - "method": "GET", + "method": "HEAD", "header": [ { "key": "Content-Type", @@ -1139,14 +1124,13 @@ "urlencoded": [] }, "url": { - "raw": "http://{{qgw_ip}}:{{qgw_port}}/v1/hos/traffic_file_bucket/123e4567-e89b-12d3-a456-426614174004", + "raw": "http://{{hos_ip}}:{{hos_port}}/hos/traffic_file_bucket/123e4567-e89b-12d3-a456-426614174004", "protocol": "http", "host": [ - "{{qgw_ip}}" + "{{hos_ip}}" ], - "port": "{{qgw_port}}", + "port": "{{hos_port}}", "path": [ - "v1", "hos", "traffic_file_bucket", "123e4567-e89b-12d3-a456-426614174004" @@ -1157,6 +1141,67 @@ }, { "name": "rtp_pcap_path_test", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.not.be.error;", + "});", + "", + "", + "" + ], + "type": "text/javascript", + "packages": {} + } + }, + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "HEAD", + "header": [ + { + "key": "Content-Type", + "value": "application/x-www-form-urlencoded", + "type": "text" + } + ], + "body": { + "mode": "urlencoded", + "urlencoded": [] + }, + "url": { + "raw": "http://{{hos_ip}}:{{hos_port}}/hos/traffic_file_bucket/123e4567-e89b-12d3-a456-426614174005", + "protocol": "http", + "host": [ + "{{hos_ip}}" + ], + "port": "{{hos_port}}", + "path": [ + "hos", + "traffic_file_bucket", + "123e4567-e89b-12d3-a456-426614174005" + ] + } + }, + "response": [] + }, + { + "name": "trouble_shooting_pcap_capture_test", "event": [ { "listen": "test", @@ -1204,7 +1249,7 @@ "urlencoded": [] }, "url": { - "raw": "http://{{qgw_ip}}:{{qgw_port}}/v1/hos/traffic_file_bucket/123e4567-e89b-12d3-a456-426614174005", + "raw": "http://{{qgw_ip}}:{{qgw_port}}/v1/hos/troubleshooting_file_bucket/123e4567-e89b-12d3-a456-426614174006", "protocol": "http", "host": [ "{{qgw_ip}}" @@ -1213,8 +1258,8 @@ "path": [ "v1", "hos", - "traffic_file_bucket", - "123e4567-e89b-12d3-a456-426614174005" + "troubleshooting_file_bucket", + "123e4567-e89b-12d3-a456-426614174006" ] } }, @@ -1227,6 +1272,74 @@ "item": [ { "name": "delete_traffic_files_test", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.not.be.error;", + "});", + "", + "", + "" + ], + "type": "text/javascript", + "packages": {} + } + }, + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "token", + "value": "{{hos_token}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "\n true\n \n 123e4567-e89b-12d3-a456-426614174001\n \n \n 123e4567-e89b-12d3-a456-426614174002\n \n \n 123e4567-e89b-12d3-a456-426614174003\n \n \n 123e4567-e89b-12d3-a456-426614174004\n \n \n 123e4567-e89b-12d3-a456-426614174005\n \n", + "options": { + "raw": { + "language": "xml" + } + } + }, + "url": { + "raw": "http://{{hos_ip}}:{{hos_port}}/hos/traffic_file_bucket?delete", + "protocol": "http", + "host": [ + "{{hos_ip}}" + ], + "port": "{{hos_port}}", + "path": [ + "hos", + "traffic_file_bucket" + ], + "query": [ + { + "key": "delete", + "value": null + } + ] + } + }, + "response": [] + }, + { + "name": "delete_troubleshooting_pcap_files_test", "event": [ { "listen": "test", @@ -1269,7 +1382,7 @@ "urlencoded": [] }, "url": { - "raw": "http://{{qgw_ip}}:{{qgw_port}}/v1/hos/traffic_file_bucket?file_names=123e4567-e89b-12d3-a456-426614174001,123e4567-e89b-12d3-a456-426614174002,123e4567-e89b-12d3-a456-426614174003,123e4567-e89b-12d3-a456-426614174004,123e4567-e89b-12d3-a456-426614174005", + "raw": "http://{{qgw_ip}}:{{qgw_port}}/v1/hos/traffic_file_bucket?file_names=123e4567-e89b-12d3-a456-426614174006", "protocol": "http", "host": [ "{{qgw_ip}}" @@ -1283,7 +1396,7 @@ "query": [ { "key": "file_names", - "value": "123e4567-e89b-12d3-a456-426614174001,123e4567-e89b-12d3-a456-426614174002,123e4567-e89b-12d3-a456-426614174003,123e4567-e89b-12d3-a456-426614174004,123e4567-e89b-12d3-a456-426614174005" + "value": "123e4567-e89b-12d3-a456-426614174006" } ] } diff --git a/24.02/tsg_olap_e2e_test/environment.json b/24.02/tsg_olap_e2e_test/environment.json index 19b7b70..4255a8f 100644 --- a/24.02/tsg_olap_e2e_test/environment.json +++ b/24.02/tsg_olap_e2e_test/environment.json @@ -4,7 +4,7 @@ "values": [ { "key": "qgw_ip", - "value": "192.168.44.67", + "value": "192.168.44.30", "type": "default", "enabled": true }, @@ -14,6 +14,24 @@ "type": "default", "enabled": true }, + { + "key": "hos_ip", + "value": "192.168.44.30", + "type": "default", + "enabled": true + }, + { + "key": "hos_port", + "value": "9098", + "type": "default", + "enabled": true + }, + { + "key": "hos_token", + "value": "fea0ee76be8147bd9b53ad995b7ef603", + "type": "default", + "enabled": true + }, { "key": "Last 10 Minutes Start", "value": "FROM_UNIXTIME(UNIX_TIMESTAMP(now())-600)", @@ -28,6 +46,6 @@ } ], "_postman_variable_scope": "environment", - "_postman_exported_at": "2024-04-20T15:08:41.582Z", + "_postman_exported_at": "2024-04-23T09:59:24.045Z", "_postman_exported_using": "Postman/10.24.22" -} +} \ No newline at end of file