diff options
| author | dongxiaoyan <[email protected]> | 2024-11-04 19:53:07 +0800 |
|---|---|---|
| committer | dongxiaoyan <[email protected]> | 2024-11-04 19:53:07 +0800 |
| commit | 4e068d80ba88ccb51b5ad4dc8c51465b1e1f5689 (patch) | |
| tree | 7f0fd994dfdd3468704b0ac45774e340bcaec4e3 | |
| parent | d7341d05e23e09f850e33cbde488e8be439b68b3 (diff) | |
1、Internal/External IP和流量IP匹配
2、Internal/External IP用例流量Server IP修改为外部IP。问题还为解决,需进一步确定Trex流量的内外部IP确定问题
3、放开用例数据中误注释代码
4、修复用例数据中的Funcation大小写错误
5 files changed, 10 insertions, 6 deletions
diff --git a/support/common_utils/create_statistics_policy.py b/support/common_utils/create_statistics_policy.py index 7189969ac..1d160eb2e 100644 --- a/support/common_utils/create_statistics_policy.py +++ b/support/common_utils/create_statistics_policy.py @@ -52,6 +52,10 @@ class CreateStatisticsPolicy: # Statistics Rule使用随机IP organize_config = OrganizeConfig() test_data = organize_config.generate_random_ip(test_data, parameter) + if "intip" in test_data["rule_name"]: + test_data["condition"]["internal_ip"][0]["item"][0]["item_value"] = test_data["traffic"]["clients_start_ip"] + elif "extip" in test_data["rule_name"]: + test_data["condition"]["external_ip"][0]["item"][0]["item_value"] = test_data["traffic"]["servers_start_ip"] if "library_condition" not in test_data: test_data["library_condition"] = [] diff --git a/tests/statistics/stats_extip_http_bar_bytes_dim_app.py b/tests/statistics/stats_extip_http_bar_bytes_dim_app.py index d7c6125f5..b392fce43 100644 --- a/tests/statistics/stats_extip_http_bar_bytes_dim_app.py +++ b/tests/statistics/stats_extip_http_bar_bytes_dim_app.py @@ -108,8 +108,8 @@ def run(parameter): "type": "trex", "clients_start_ip": "10.64.224.31", "clients_end_ip": "10.64.224.31", - "servers_start_ip": "2.1.1.31", - "servers_end_ip": "2.1.1.31", + "servers_start_ip": "60.190.243.167", + "servers_end_ip": "60.190.243.167", "m": 1, "d": 1, "yaml_name": "test", diff --git a/tests/statistics/stats_intip_http_bar_bytes_dim_app.py b/tests/statistics/stats_intip_http_bar_bytes_dim_app.py index 310f1c0c6..183982e8b 100644 --- a/tests/statistics/stats_intip_http_bar_bytes_dim_app.py +++ b/tests/statistics/stats_intip_http_bar_bytes_dim_app.py @@ -108,8 +108,8 @@ def run(parameter): "type": "trex", "clients_start_ip": "10.64.224.31", "clients_end_ip": "10.64.224.31", - "servers_start_ip": "2.1.1.31", - "servers_end_ip": "2.1.1.31", + "servers_start_ip": "60.190.243.167", + "servers_end_ip": "60.190.243.167", "m": 1, "d": 1, "yaml_name": "test", diff --git a/tests/statistics/stats_srcip_dstip_http_hex_resheader_line_all_bytes.py b/tests/statistics/stats_srcip_dstip_http_hex_resheader_line_all_bytes.py index ab23fb66c..9dfb639d6 100644 --- a/tests/statistics/stats_srcip_dstip_http_hex_resheader_line_all_bytes.py +++ b/tests/statistics/stats_srcip_dstip_http_hex_resheader_line_all_bytes.py @@ -95,7 +95,7 @@ def run(parameter): { "item_operation": "add", "item_type": "request_header", - #"item_key": "User-Agent", + "item_key": "User-Agent", "item_value": "HEX", "value": [ "557365722D4167656E743A206375726C2F382E302E31"#User-Agent: curl/8.0.1 diff --git a/tests/statistics/stats_srcip_dstip_http_line_in_out_pkts_dim_c_ip_object.py b/tests/statistics/stats_srcip_dstip_http_line_in_out_pkts_dim_c_ip_object.py index 174ac2629..7a7d9dfea 100644 --- a/tests/statistics/stats_srcip_dstip_http_line_in_out_pkts_dim_c_ip_object.py +++ b/tests/statistics/stats_srcip_dstip_http_line_in_out_pkts_dim_c_ip_object.py @@ -112,7 +112,7 @@ def run(parameter): "chart_name": "default name", "visualization_type": "Line", "metrics": [ - "in_pkts+out_pkts:Sum:pkts" + "in_pkts+out_pkts:SUM:pkts" ], "dimensions": ["client_ip_object_list"], "order_by": "", |
