Skip to content

Commit 89aa7fa

Browse files
Carsten SchaferCarsten Schafer
authored andcommitted
Merge remote-tracking branch 'origin/master'
2 parents c5059c6 + e056157 commit 89aa7fa

15 files changed

Lines changed: 1325 additions & 647 deletions

File tree

.allure-overview/overviews.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
"advanced": {
1212
"OVERVIEW_TITLE": "'OpenWifi advanced results'",
13-
"OVERVIEW_TESTBEDS": ["edgecore_eap104","edgecore_eap101","edgecore_eap111","hfcl_ion4xe","cig_wf189","edgecore_eap105","sonicfi_rap7110c-341x","cig_wf196","yuncore_fap655","udaya_a6-id2","sonicfi_rap630c-311g"]
13+
"OVERVIEW_TESTBEDS": ["edgecore_eap104","edgecore_eap101","edgecore_eap111","edgecore_eap112","hfcl_ion4xe","cig_wf189","edgecore_eap105","sonicfi_rap7110c-341x","cig_wf189h","sonicfi_rap630c-311g","yuncore_fap655","edgecore_oap103","udaya_a6-id2","cig_wf196"]
1414
},
1515

1616
"performance": {

.github/workflows/regression.yml

Lines changed: 392 additions & 2 deletions
Large diffs are not rendered by default.

libs/tip_2x/ap_lib.py

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,31 @@ def check_connectivity(self, idx=0, print_log=True, attach_allure=True):
107107
pytest.fail("up0v0 interface is failed to have connectivity!!!")
108108

109109
def get_uci_show(self, param="ucentral", idx=0, print_log=True, attach_allure=True):
110-
output = self.run_generic_command(cmd="uci show " + param, idx=idx,
111-
print_log=print_log,
112-
attach_allure=attach_allure,
113-
expected_attachment_type=allure.attachment_type.TEXT)
114-
110+
command = "uci show " + param
111+
if "server" in param:
112+
output = self.run_generic_command(cmd=command, idx=idx,
113+
print_log=print_log,
114+
attach_allure=attach_allure,
115+
expected_attachment_type=allure.attachment_type.TEXT)
116+
ret_val = str(output).split("=")[1]
117+
if "cicd.lab.wlan.tip.build" in ret_val:
118+
logging.info(f"we are fetching server url with the command: {command}")
119+
else:
120+
command = "cat /etc/ucentral/gateway.json"
121+
logging.info(f"we are fetching server url with the command: {command}")
122+
output = self.run_generic_command(cmd=command, idx=idx,
123+
print_log=print_log,
124+
attach_allure=attach_allure,
125+
expected_attachment_type=allure.attachment_type.TEXT)
126+
else:
127+
logging.info(f"command:{command}")
128+
output = self.run_generic_command(cmd=command, idx=idx,
129+
print_log=print_log,
130+
attach_allure=attach_allure,
131+
expected_attachment_type=allure.attachment_type.TEXT)
115132
return output
116133

134+
117135
def restart_ucentral_service(self, idx=0, print_log=True, attach_allure=True):
118136
output = self.run_generic_command(cmd="/etc/init.d/ucentral restart", idx=idx,
119137
print_log=print_log,

tests/e2e/basic/performance_tests/performance_pass_fail.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@
6969
"UDP": null
7070
},
7171
"5G 2x2 80MHz": {
72-
"TCP": 800,
73-
"UDP": 900
72+
"TCP": 600,
73+
"UDP": 700
7474
},
7575
"5G 4x4 80MHz": {
7676
"TCP": null,
@@ -274,8 +274,8 @@
274274
"UDP": null
275275
},
276276
"5G 2x2 80MHz": {
277-
"TCP": 800,
278-
"UDP": 900
277+
"TCP": 600,
278+
"UDP": 700
279279
},
280280
"5G 4x4 80MHz": {
281281
"TCP": null,

tests/e2e/basic/schema_validation/test_schema_validation.py

Lines changed: 34 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from tabulate import tabulate
1010
from datetime import datetime
1111

12-
pytestmark = [pytest.mark.schema_validation]
12+
pytestmark = [pytest.mark.schema_validation_tests, pytest.mark.ow_regression_lf]
1313

1414

1515
# Get the directory of the current test config file
@@ -22,12 +22,12 @@
2222
config_data_1 = json.loads(json_string)
2323

2424
file_path2 = os.path.join(test_file_dir, 'master-config-2.json')
25-
with open(file_path, 'r') as file:
25+
with open(file_path2, 'r') as file:
2626
json_string = file.read()
2727
config_data_2 = json.loads(json_string)
2828

2929
file_path3 = os.path.join(test_file_dir, 'master-config-3.json')
30-
with open(file_path, 'r') as file:
30+
with open(file_path3, 'r') as file:
3131
json_string = file.read()
3232
config_data_3 = json.loads(json_string)
3333

@@ -50,7 +50,6 @@ def get_github_file(url, path=None, commit_id=None):
5050
"wlan-ucentral-schema repo.")
5151
return response.text
5252

53-
5453
def validate_schema_through_github(commit_id, path):
5554
def get_commit_id(owner, repo, path="", headers=None):
5655
if headers is None:
@@ -116,14 +115,24 @@ def generate_diff(wlan_ucentral_schema_url, latest_version_id, previous_version_
116115
allure.attach(updated_schema_pretty_json, name=f"NEW {path}:")
117116

118117
if updated_schema_pretty_json == previous_schema_pretty_json:
119-
logging.info(f"No changes found at {path}. Exiting.")
118+
logging.info(f"No changes were found at {path}. Exiting.")
119+
allure.attach(name=f"No changes found at {path}", body=f"No changes were found at {path}. Exiting the test.")
120120
return None, None, None
121121
else:
122122
logging.info(f"Changes found at {path}. Proceeding with the comparison.")
123123
added_keys, removed_keys, changed_items = compare_dicts(json.loads(previous_schema_pretty_json),
124124
json.loads(updated_schema_pretty_json))
125125
return added_keys, removed_keys, changed_items
126126

127+
def convert_changed_items_to_vertical_table(changed_items):
128+
formatted_rows = []
129+
for path, old, new in changed_items:
130+
formatted_rows.append(["Key Path", path])
131+
formatted_rows.append(["Old Value", old])
132+
formatted_rows.append(["New Value", new])
133+
formatted_rows.append(["", ""]) # Add blank line between entries
134+
return tabulate(formatted_rows, headers=["Field", "Content"], tablefmt="fancy_grid")
135+
127136
if commit_id is None:
128137
logging.info("Use --commit-id to the pass an old commit-id of tip/wlan-ucentral-schema repo. Skipping the test.")
129138
pytest.skip("Use --commit-id to the pass an old commit-id of tip/wlan-ucentral-schema repo. Skipping the test.")
@@ -164,15 +173,17 @@ def generate_diff(wlan_ucentral_schema_url, latest_version_id, previous_version_
164173
if changed_items:
165174
changed_items = [list(key) for key in changed_items]
166175
changed_items = sorted(changed_items)
167-
message = ("Note: The value at these key paths have been modified.\n\n"
168-
+ tabulate(changed_items, headers=['Key Paths', 'Old Value', 'New Value'], tablefmt='fancy_grid'))
176+
message = (
177+
"Note: The following key paths have modified values:\n\n"
178+
+ convert_changed_items_to_vertical_table(changed_items)
179+
)
169180
logging.info("\nChanged Items:\n" + message + "\n")
170181
allure.attach(message, name="Changed items:")
171182
pytest.fail(f"Differences found in the schema, check Test Body for Added/Removed/Changed items")
172183
return
173184

174185

175-
def validate_state_message_through_ap(test_object, target_object, config_data):
186+
def validate_state_message_through_ap(test_object, target_object, config_data, ssid=None):
176187
def get_type_of_message(message):
177188
type_of_message = "unknown"
178189
if isinstance(message, dict):
@@ -316,8 +327,9 @@ def verify_type_of_value(message, schema, path):
316327
radio_5g = dict_all_radios_5g[radio][0]
317328
break
318329

330+
logging.info(f"ssid:{ssid}")
319331
test_object.pre_cleanup()
320-
fiveg_sta_got_ip = test_object.client_connect_using_radio(ssid="captive-credential-4",
332+
fiveg_sta_got_ip = test_object.client_connect_using_radio(ssid=ssid,
321333
passkey="OpenWifi",
322334
security="wpa2", radio=radio_5g,
323335
station_name=["station-5G"],
@@ -448,7 +460,7 @@ def test_schema_through_github(self, commit_id):
448460
Objective is to identify any modifications, additions, or removals in the file: ucentral.schema.json.
449461
450462
Unique Marker:
451-
schema_validation and through_github and schema_json
463+
schema_validation_tests and through_github and schema_json
452464
"""
453465
validate_schema_through_github(commit_id, "/ucentral.schema.json")
454466

@@ -466,7 +478,7 @@ def test_schema_full_through_github(self, commit_id):
466478
Objective is to identify any modifications, additions, or removals in the file: ucentral.schema.full.json.
467479
468480
Unique Marker:
469-
schema_validation and through_github and schema_full_json
481+
schema_validation_tests and through_github and schema_full_json
470482
"""
471483
validate_schema_through_github(commit_id, "/ucentral.schema.full.json")
472484

@@ -483,7 +495,7 @@ def test_schema_pretty_through_github(self, commit_id):
483495
Objective is to identify any modifications, additions, or removals in the file: ucentral.schema.pretty.json.
484496
485497
Unique Marker:
486-
schema_validation and through_github and schema_pretty_json
498+
schema_validation_tests and through_github and schema_pretty_json
487499
"""
488500
validate_schema_through_github(commit_id, "/ucentral.schema.pretty.json")
489501

@@ -500,7 +512,7 @@ def test_state_pretty_through_github(self, commit_id):
500512
Objective is to identify any modifications, additions, or removals in the file: ucentral.state.pretty.json.
501513
502514
Unique Marker:
503-
schema_validation and through_github and state_pretty_json
515+
schema_validation_tests and through_github and state_pretty_json
504516
"""
505517
validate_schema_through_github(commit_id, "/ucentral.state.pretty.json")
506518

@@ -524,9 +536,10 @@ def test_state_message_schema_master_config_1(self, get_test_library, get_target
524536
Objective is to detect discrepancies in data types (e.g., string to integer) and object structures.
525537
526538
Unique Marker:
527-
schema_validation and through_ap_terminal and master_config_1
539+
schema_validation_tests and through_ap_terminal and master_config_1
528540
"""
529-
validate_state_message_through_ap(get_test_library, get_target_object, config_data=config_data_1)
541+
ssid = "captive-credential-4"
542+
validate_state_message_through_ap(get_test_library, get_target_object, config_data=config_data_1, ssid=ssid)
530543

531544
@pytest.mark.master_config_2
532545
@allure.title("Pushing master config-2")
@@ -541,9 +554,10 @@ def test_state_message_schema_master_config_2(self, get_test_library, get_target
541554
Objective is to detect discrepancies in data types (e.g., string to integer) and object structures.
542555
543556
Unique Marker:
544-
schema_validation and through_ap_terminal and master_config_2
557+
schema_validation_tests and through_ap_terminal and master_config_2
545558
"""
546-
validate_state_message_through_ap(get_test_library, get_target_object, config_data=config_data_2)
559+
ssid = "captive-uam-8"
560+
validate_state_message_through_ap(get_test_library, get_target_object, config_data=config_data_2, ssid=ssid)
547561

548562
@pytest.mark.master_config_3
549563
@allure.title("Pushing master config-3")
@@ -558,6 +572,7 @@ def test_state_message_schema_master_config_3(self, get_test_library, get_target
558572
Objective is to detect discrepancies in data types (e.g., string to integer) and object structures.
559573
560574
Unique Marker:
561-
schema_validation and through_ap_terminal and master_config_3
575+
schema_validation_tests and through_ap_terminal and master_config_3
562576
"""
563-
validate_state_message_through_ap(get_test_library, get_target_object, config_data=config_data_3)
577+
ssid = "Uchannel-ds-4"
578+
validate_state_message_through_ap(get_test_library, get_target_object, config_data=config_data_3, ssid=ssid)

tests/e2e/basic/validation_of_operating_modes/bridge_mode/multi_psk/wpa2_security/test_multipsk_basic_wpa2.py

Lines changed: 0 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -130,124 +130,3 @@ def test_client_wpa2_2g_vlan2(self, get_test_library, get_dut_logs_per_test_case
130130
passkey=security_key,
131131
encryption=security, mode=mode, num_sta=1, dut_data=setup_configuration)
132132
assert True
133-
134-
135-
136-
setup_params_general = {
137-
"mode": "BRIDGE",
138-
"ssid_modes": {
139-
"wpa2_personal": [
140-
{"ssid_name": "OpenWifi-roam",
141-
"appliedRadios": ["2G", "5G"],
142-
"security": "psk2",
143-
"security_key": "OpenWifi",
144-
"multi-psk": [
145-
{"key": "aaaaaaaa"},
146-
{"key": "bbbbbbbb"}
147-
],
148-
"roaming": True,
149-
"rrm": {
150-
"reduced-neighbor-reporting": True
151-
}
152-
}
153-
],
154-
"wpa3_personal": [
155-
{"ssid_name": "OpenWifi-roam",
156-
"appliedRadios": ["6G"],
157-
"security": "sae",
158-
"security_key": "OpenWifi",
159-
"roaming": True,
160-
"rrm": {
161-
"reduced-neighbor-reporting": True
162-
}
163-
}
164-
]
165-
},
166-
"rf": {
167-
"2G": {
168-
"band": "2G",
169-
"channel-width": 20,
170-
"channel-mode": "EHT",
171-
"channel": "auto"
172-
},
173-
"5G": {
174-
"band": "5G",
175-
"channel-width": 80,
176-
"channel-mode": "EHT",
177-
"channel": 36
178-
},
179-
"6G": {
180-
"band": "6G",
181-
"channel-width": 320,
182-
"channel-mode": "EHT",
183-
"channel": 33
184-
}
185-
},
186-
"radius": False
187-
}
188-
189-
testbed_details_global = None
190-
dut_data = {}
191-
192-
@pytest.fixture(scope="class")
193-
def setup_initial_configuration(request):
194-
"""Calls setup_testbed automatically before tests"""
195-
global setup_params_general
196-
global dut_data
197-
logging.info(f"Setup Params Assigned: {setup_params_general}")
198-
199-
requested_combination = [['2G', 'wpa2_personal'], ['5G', 'wpa2_personal'], ['6G', 'wpa3_personal']]
200-
201-
logging.info(f"requested_combination:::{requested_combination}")
202-
get_target_obj = request.getfixturevalue("get_target_object")
203-
logging.info("ready to start setup_basic_configuration")
204-
logging.info(f"setup_params_general value before start:{setup_params_general}")
205-
dut_data = get_target_obj.setup_basic_configuration(configuration=setup_params_general,
206-
requested_combination=requested_combination)
207-
208-
logging.info(f"setup_basic_configuration dut data:{dut_data}")
209-
210-
@allure.feature("MultiPsk Test")
211-
@allure.parent_suite("MultiPsk Test")
212-
@allure.suite("BRIDGE Mode")
213-
@allure.sub_suite("WPA2 Security")
214-
class TestEmpsk6GBridgeWPA2(object):
215-
216-
# @pytest.mark.wpa3_personal
217-
# @pytest.mark.wpa2_personal
218-
# @pytest.mark.sixg
219-
# @pytest.mark.twog
220-
# @pytest.mark.fiveg
221-
@pytest.mark.empsk
222-
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-14423", name="WIFI-14423")
223-
@allure.title("Test E-MPSK with WPA2 to WPA3 on 6GHz")
224-
def test_client_wpa2_wpa3_6g_empsk(self, setup_initial_configuration, get_test_library,get_target_object,
225-
check_connectivity, get_testbed_details):
226-
"""
227-
Verify E-MPSK working in BRIDGE mode:
228-
- Client connects on 2.4/5GHz (WPA2 and WPA3)
229-
- Encryption is changed from WPA2 to WPA3 (disable WPA2)
230-
- Verify client successfully get an IP and associate to AP
231-
"""
232-
profile_data = {
233-
"ssid_name": "OpenWifi-roam",
234-
"appliedRadios": ["2G"],
235-
"security": "psk2",
236-
"security_key": "OpenWifi",
237-
"multi-psk": [
238-
{"key": "aaaaaaaa"},
239-
{"key": "bbbbbbbb"}
240-
]
241-
}
242-
ssid = profile_data["ssid_name"]
243-
security = "wpa2"
244-
mode = "BRIDGE"
245-
band = "twog"
246-
num_sta = 1
247-
security_key = profile_data["multi-psk"][0]["key"]
248-
sta_data = get_test_library.empsk_test(ssid=ssid, passkey=security_key, security=security, is_bw320=True,
249-
mode=mode, band=band, pre_cleanup=True, num_sta=num_sta,
250-
scan_ssid=True, dut_data=dut_data, extra_securities = ["wpa3"],
251-
allure_attach=True)
252-
253-
logging.info(f"sta_data{sta_data}")

tests/e2e/basic/validation_of_operating_modes/bridge_mode/multi_psk/wpa3_security/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)