Skip to content

Commit a7e91e5

Browse files
Added test case: whether the APs are saving crash logs to pstore (#1079)
* Added test case: whether the APs are saving crash logs to pstore Signed-off-by: jitendra-kushavah <[email protected]> * Added regression marker for pstore test case Signed-off-by: jitendra-kushavah <[email protected]> --------- Signed-off-by: jitendra-kushavah <[email protected]>
1 parent 268e10c commit a7e91e5

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

tests/e2e/basic/save_crashlog_to_pstore/__init__.py

Whitespace-only changes.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
"""
2+
3+
Save crashlog to pstore
4+
pytest -m "save_crashlog_to_pstore"
5+
6+
"""
7+
import json
8+
import logging
9+
import time
10+
11+
import allure
12+
import pytest
13+
14+
pytestmark = [pytest.mark.save_crashlog_to_pstore, pytest.mark.bridge, pytest.mark.wap2_personal,
15+
pytest.mark.ow_regression_lf]
16+
17+
setup_params_general = {
18+
"mode": "BRIDGE",
19+
"ssid_modes": {
20+
"wpa2_personal": [
21+
{"ssid_name": "OpenWifi_2G", "appliedRadios": ["2G"], "security_key": "OpenWifi"}]},
22+
"rf":{},
23+
"radius": False
24+
}
25+
26+
@allure.feature("Save_crashlog_to_pstore")
27+
@allure.parent_suite("Save crashlog to pstore")
28+
@pytest.mark.parametrize(
29+
'setup_configuration',
30+
[setup_params_general],
31+
indirect=True,
32+
scope="class"
33+
)
34+
@pytest.mark.usefixtures("setup_configuration")
35+
class TestSaveCrashlogToPstore(object):
36+
"""
37+
Save crashlog to pstore
38+
pytest -m "save_crashlog_to_pstore"
39+
"""
40+
41+
@pytest.mark.wpa2_personal
42+
@pytest.mark.twog
43+
@allure.title("Test save crashlog to pstore")
44+
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-14627", name="WIFI-14627")
45+
def test_save_crashlog_to_pstore(self, get_test_library,
46+
get_testbed_details,
47+
get_target_object,
48+
setup_configuration,
49+
):
50+
"""
51+
Test Description: To verify whether the APs are saving crash logs to pstore or uploading them to the cloud.
52+
We manually trigger a crash using the command echo c > /proc/sysrq-trigger. After executing the crash command,
53+
wait for the AP to crash and reconnect to the Gateway (GW).
54+
Once the AP is back online, check the crashlogs under the Reboot Logs section in the
55+
GW to verify if the crash logs have been saved. If the logs are present, the test is considered PASS.
56+
Marker: "save_crashlog_to_pstore"
57+
"""
58+
get_test_library.save_crashlogs_to_pstore(get_target_object=get_target_object, get_testbed_details=get_testbed_details)
59+
60+
assert True

0 commit comments

Comments
 (0)