def test_022_failover_check_flow(self): u"""failover ap上,确认流量是否能够同步master ap(testlink_ID:2365)--bug83451""" log.debug("022") tmp = APSBusiness(self.driver) #登录failover ap的web界面 tmp.login_failover_ap(data_basic['slave_web2'], "failover", data_login['all']) tmp1 = OVBusiness(self.driver) #获取第一个ap下载流量 result1, result2 = tmp1.get_AP_download() assert ("MB" in result1) or ("GB" in result1) self.assertLess(0, result2), "failover ap,check the sync of failover ap's DB,test fail!" print "failover ap,check the sync of failover ap's DB,test pass!"
def test_040_failover_master_check_ap_flow(self): u"""failover ap 切换到master ap模式后,确认failover ap流量能正确更新到新的master ap上(testlink_ID:2395)""" log.debug("040") tmp = APSBusiness(self.driver) #登录failover ap的web界面 tmp.login_failover_ap(data_basic['slave_web2'], data_basic['superUser'], data_login['all']) tmp1 = OVBusiness(self.driver) #获取第一个ap下载流量 result1, result2 = tmp1.get_AP_download() assert ("MB" in result1) or ("GB" in result1) self.assertLess(0, result2), "after failover change to master check ap traffic,test fail!" print "after failover change to master check ap traffic,test pass!"
def test_037_failover_check_flow(self): u"""failover ap 切换到master ap模式后,检查ap流量能正确显示(testlink_ID:2409)""" log.debug("037") tmp = APSBusiness(self.driver) #master ap关闭controller tmp.close_master_controller(data_basic['DUT_ip'], data_basic['sshUser'], data_login['all']) #等待10分钟 time.sleep(610) #登录failover ap的web界面 tmp.login_failover_ap(data_basic['slave_web2'], "failover", data_login['all']) #AP 下载/上传流量---master ap tmp1 = OVBusiness(self.driver) tmp1.set_AP_download_unload(data_ng['NG2_ssid'], data_wireless["short_wpa"], data_basic['wlan_pc'], data_basic['lan_pc']) # 作为failover登录AP Lg = LoginBusiness(self.driver) Lg.login("failover", data_login['all']) #获取第一个ap下载流量 result1, result2 = tmp1.get_AP_download() assert ("MB" in result1) or ("GB" in result1) self.assertLess(0, result2), "after failover change to master check ap traffic,test fail!" print "after failover change to master check ap traffic,test pass!"