tests: boardfarm: changed ap_config_renew to use new vap functions

Signed-off-by: David <davidmgafonso@gmail.com>
This commit is contained in:
David
2021-01-26 15:44:48 +00:00
parent f20082728a
commit 6e8db05707
3 changed files with 45 additions and 10 deletions

16
.vscode/launch.json vendored
View File

@@ -4,6 +4,22 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Remote Attach",
"type": "python",
"request": "attach",
"justMyCode": false,
"connect": {
"host": "0.0.0.0",
"port": 5678
},
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "${workspaceFolder}"
}
]
},
{
"name": "(gdb) GATEWAY - Attach to beerocks_controller",
"type": "cppdbg",

View File

@@ -88,6 +88,7 @@ class PrplMeshPrplWRT(OpenWrtRouter, PrplMeshBase):
conn_cmd = "ssh -o PubkeyAuthentication=no" \
" -o StrictHostKeyChecking=no" \
" {}@{}".format(self.username, self.wan_ip)
self.connection = connection_decider.connection(device=self,
conn_type="ssh",
conn_cmd=conn_cmd)

View File

@@ -8,6 +8,7 @@ import time
from .prplmesh_base_test import PrplMeshBaseTest
from capi import tlv
import environment
class ApConfigRenew(PrplMeshBaseTest):
@@ -33,23 +34,40 @@ class ApConfigRenew(PrplMeshBaseTest):
tlv(0x10, 0x0001, "{0x00}"))
time.sleep(5)
self.check_log(agent.radios[0],
r"ssid: Boardfarm-Tests-24G-1 .*"
r"fronthaul: true backhaul: false",
timeout=60)
self.check_log(agent.radios[0],
r"ssid: Boardfarm-Tests-24G-2 .*"
r"fronthaul: false backhaul: true",
timeout=60)
ssid_1 = 'Boardfarm-Tests-24G-1'
radio_0_vap_0 = agent.radios[0].get_vap(ssid_1)
if not radio_0_vap_0:
self.fail("Radio 0 vap {} not found".format(ssid_1))
vap_bss_type = radio_0_vap_0.get_bss_type()
if vap_bss_type != environment.BssType.Fronthaul:
self.fail(
f"Radio 0 vap {ssid_1} bss type is {vap_bss_type.name}"
" when it should be Fronthaul")
ssid_2 = 'Boardfarm-Tests-24G-2'
radio_0_vap_1 = agent.radios[0].get_vap(ssid_2)
if not radio_0_vap_1:
self.fail("Radio 1 vap {} not found".format(ssid_2))
vap_bss_type = radio_0_vap_1.get_bss_type()
if vap_bss_type != environment.BssType.Backhaul:
self.fail(
f"Radio 1 vap {ssid_2} bss type is {vap_bss_type.name}"
" when it should be Backhaul")
self.check_log(agent.radios[1],
r"tear down radio",
timeout=60)
bssid1 = agent.ucc_socket.dev_get_parameter('macaddr',
ruid='0x' +
agent.radios[0].mac.replace(':', ''),
ssid='Boardfarm-Tests-24G-1')
ssid=ssid_1)
if not bssid1:
self.fail("repeater1 didn't configure Boardfarm-Tests-24G-1")
self.fail(f"repeater1 didn't configure {ssid_1}")
# simulate wps onboarding to the backhaul vap
agent.ucc_socket.start_wps_registration("24G")
self.check_log(agent.radios[0], r"Start WPS PBC", timeout=60)