mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-11-03 12:27:53 +00:00
- checking if AP is pointing to expected SDK
Signed-off-by: Sushant Bawiskar <sushant.bawiskar@candelatech.com>
This commit is contained in:
committed by
Sushant Bawiskar
parent
5dfea205a6
commit
00e0d7d004
@@ -95,29 +95,22 @@ class TestResources(object):
|
|||||||
uci_show_ucentral = ap_ssh.run_generic_command("uci show ucentral")
|
uci_show_ucentral = ap_ssh.run_generic_command("uci show ucentral")
|
||||||
print(uci_show_ucentral)
|
print(uci_show_ucentral)
|
||||||
print(ap_ssh.get_ap_uci_show_ucentral())
|
print(ap_ssh.get_ap_uci_show_ucentral())
|
||||||
if ap_ssh.get_ap_uci_show_ucentral() != get_configuration["controller"]['url']:
|
expected_sdk = str(get_configuration["controller"]['url'].replace("https://sec", "\'gw").replace(":16001","\'"))
|
||||||
|
if ap_ssh.get_ap_uci_show_ucentral() != expected_sdk:
|
||||||
for i in range(10):
|
for i in range(10):
|
||||||
ucentral_show = ap_ssh.get_ap_uci_show_ucentral()
|
ucentral_show = str(ap_ssh.get_ap_uci_show_ucentral().strip())
|
||||||
|
print("AP pointing to: ", ucentral_show)
|
||||||
|
print("AP should point to: ", expected_sdk)
|
||||||
|
|
||||||
if ucentral_show != get_configuration["controller"]['url'] and i < 9:
|
if ucentral_show != expected_sdk and i < 9:
|
||||||
print("AP is not pointing to right SDK, retry after 30 sec")
|
print("AP is not pointing to right SDK, retry after 30 sec")
|
||||||
time.sleep(30)
|
time.sleep(30)
|
||||||
elif ucentral_show != get_configuration["controller"]['url'] and i == 9:
|
elif ucentral_show != expected_sdk and i == 9:
|
||||||
|
assert False
|
||||||
pytest.exit("AP is not pointing to right SDK")
|
pytest.exit("AP is not pointing to right SDK")
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
|
|
||||||
# for i in uci_show_ucentral:
|
|
||||||
# if i.startswith("ucentral.config.server="):
|
|
||||||
# ap_sdk_information = i.split("=")[1]
|
|
||||||
# if ap_sdk_information != get_configuration["controller"]['url']:
|
|
||||||
# print("ap_sdk_information from AP: ",ap_sdk_information)
|
|
||||||
# print("Expected SDK: ",get_configuration["controller"]['url'])
|
|
||||||
# print("SDK not same")
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
assert True
|
assert True
|
||||||
|
|
||||||
@pytest.mark.test_access_points_connectivity
|
@pytest.mark.test_access_points_connectivity
|
||||||
|
|||||||
Reference in New Issue
Block a user