def setup_class(self): # 获取参数 fun.ssh_gw.connect() # fun.rbm.connect() fun.ssh_c.connect() fun.ssh_s.connect() self.clr_env = clr_env.clear_env self.case1_step1 = index.case1_step1 self.case1_step2 = index.case1_step2 self.case1_step3 = index.case1_step3 self.case1_step4 = index.case1_step4 self.case1_step5 = index.case1_step5 self.case1_step6 = index.case1_step6 self.case2_step1 = index.case2_step1 self.case2_step2 = index.case2_step2 self.case2_step3 = index.case2_step3 self.case2_step4 = index.case2_step4 self.case2_step5 = index.case2_step5 self.case3_step1 = index.case3_step1 self.case3_step2 = index.case3_step2 self.case3_step3 = index.case3_step3 self.case3_step4 = index.case3_step4 self.case3_step5 = index.case3_step5 self.pkt1_cfg = index.pkt1_cfg self.pkt2_cfg = index.pkt2_cfg self.pkt3_cfg = index.pkt3_cfg self.cap_pcap1 = self.pkt1_cfg["capture"][3] self.cap_pcap2 = self.pkt2_cfg["capture"][3] self.cap_pcap3 = self.pkt3_cfg["capture"][3] self.read_1 = self.pkt1_cfg["read"][0] self.read_2 = self.pkt2_cfg["read"][0] self.read_3 = self.pkt3_cfg["read"][0] clr_env.clear_env()
def setup_class(self): # 获取参数 fun.ssh_gw.connect() self.clr_env = clr_env self.case1_step1 = index.case1_step1 self.case1_step11 = index.case1_step11 self.case1_step2 = index.case1_step2 self.case2_step1 = index.case2_step1 self.case2_step11 = index.case2_step11 self.case2_step2 = index.case2_step2 self.host = index.host self.port = index.port self.username = index.username self.password = index.password self.case1_upremotePath = index.case1_upremotePath self.case1_uplocalPath = index.case1_uplocalPath self.case1_deny_upremotePath = index.case1_deny_upremotePath self.case1_deny_uplocalPath = index.case1_deny_uplocalPath self.case2_upremotePath = index.case2_upremotePath self.case2_uplocalPath = index.case2_uplocalPath self.case2_allow_upremotePath = index.case2_allow_upremotePath self.case2_allow_uplocalPath = index.case2_allow_uplocalPath self.case2_deny_upremotePath = index.case2_deny_upremotePath self.case2_deny_uplocalPath = index.case2_deny_uplocalPath clr_env.clear_env()
def setup_class(self): # 获取参数 fun.ssh_gw.connect() fun.ssh_c.connect() fun.ssh_s.connect() self.clr_env = clr_env.clear_env self.case1_step1 = index.case1_step1 self.case1_step2 = index.case1_step2 self.case2_step1 = index.case2_step1 self.case2_step2 = index.case2_step2 self.case3_step1 = index.case3_step1 self.case3_step2 = index.case3_step2 self.case4_step1 = index.case4_step1 self.case4_step2 = index.case4_step2 self.pkt1_cfg = index.pkt1_cfg self.pkt2_cfg = index.pkt2_cfg self.pkt3_cfg = index.pkt3_cfg self.pkt4_cfg = index.pkt4_cfg self.cap_pcap1 = self.pkt1_cfg["capture"][3] self.cap_pcap2 = self.pkt2_cfg["capture"][3] self.cap_pcap3 = self.pkt3_cfg["capture"][3] self.cap_pcap4 = self.pkt4_cfg["capture"][3] clr_env.clear_env() fun.cmd('rm -rf /opt/pkt/test_acl_mode_*', 's')
def teardown_class(self): # 回收环境 clr_env.clear_env() fun.send(rbmExc, message.delvlan['SetVlan'], rbmDomain, base_path) fun.rbm_close() fun.ssh_close('gw')
def setup_method(self): print('说明:CA测试涉及到的三个证书如下\n' '1.根证书/usr/local/ipauth/file/CAdb/cacert.pem md5值为c970dfa3234ed84ccac2e819a1276026有效期为2020/6/30 到 2023/6/30,若证书失效需替换\n' '2.认证服务设备端证书/usr/local/ipauth/file/ordinaryUser/app.crt有效期为2021/7/14 到 2023/7/14,若证书失效需替换\n' '3.客户端证书test2certandkey.pem有效期为2021/7/14 到 2023/7/14,,若证书失效需替换\n') clr_env.clear_env('gw') clr_env.clear_met_acl('gw')
def teardown_method(self): clr_env.clear_env('gw') clr_env.clear_met_acl('gw') fun.cmd(self.case1_step7["step2"][0], 'gw') fun.send(rbmExc, message.verifymod_DelAuthCert['DelAuthCert'], domain_rmb, base_path) clr_env.verifymod_teardown_met(base_path)
def teardown_method(self): clr_env.clear_env('gw') clr_env.clear_met_acl('gw') fun.cmd(self.case_step["step1"][0], 'c') fun.cmd(self.case_step["step1"][0], 's')
def teardown_method(self): clr_env.clear_env('gw') clr_env.clear_met_acl('gw') fun.cmd("rm -f /opt/*txt*", 'c') re1 = fun.cmd("ls /opt/ |grep txt", 'c') print('客户端txt文件查询结果是:', re1) assert self.case_step2["step1"][0] not in re1
def setup_class(self): # 获取参数 fun.ssh_gw.connect() fun.ssh_c.connect() fun.ssh_s.connect() self.clr_env = clr_env self.case1_step = index.case1_step self.case2_step = index.case2_step self.case3_step = index.case3_step self.case4_step = index.case4_step self.case5_step = index.case5_step self.case6_step = index.case6_step self.case7_step = index.case7_step self.case8_step = index.case8_step self.pkt1_cfg = index.pkt1_cfg self.pkt2_cfg = index.pkt2_cfg self.pkt3_cfg = index.pkt3_cfg self.pkt4_cfg = index.pkt4_cfg self.pkt5_cfg = index.pkt5_cfg self.pkt6_cfg = index.pkt6_cfg self.pkt7_cfg = index.pkt7_cfg self.pkt8_cfg = index.pkt8_cfg self.cap_pcap1 = self.pkt1_cfg["capture"][3] self.cap_pcap2 = self.pkt2_cfg["capture"][3] self.cap_pcap3 = self.pkt3_cfg["capture"][3] self.cap_pcap4 = self.pkt4_cfg["capture"][3] self.cap_pcap5 = self.pkt5_cfg["capture"][3] self.cap_pcap6 = self.pkt6_cfg["capture"][3] self.cap_pcap7 = self.pkt7_cfg["capture"][3] self.cap_pcap8 = self.pkt8_cfg["capture"][3] clr_env.clear_env()
def setup_class(self): # 获取参数 fun.ssh_gw.connect() self.clr_env = clr_env self.case1_step1 = index.case1_step1 self.case1_step11 = index.case1_step11 self.case1_step2 = index.case1_step2 self.delcheck = index.delcheck self.mail_sender = index.mail_sender self.mail_receivers = index.mail_receivers self.mail_cc = index.mail_cc self.mail_bcc = index.mail_bcc self.mail_host = index.mail_host self.mail_port = index.mail_port self.mail_user = index.mail_user self.mail_pass = index.mail_pass self.pop3_email = index.pop3_email self.pop3_pwd = index.pop3_pwd self.pop3_server_host = index.pop3_server_host self.pop3_server_port = index.pop3_server_port self.deny_mail = index.deny_mail self.deny_pwd = index.deny_pwd self.context = index.context self.deny_title = index.deny_title self.title = index.title self.deny_name_file = index.deny_name_file self.deny_extend_file = index.deny_extend_file self.file = index.file self.attach_file = index.attach_file self.attach_extend = index.attach_extend self.attach_path = index.attach_path clr_env.clear_env()
def setup_class(self): # 获取参数 fun.ssh_gw.connect() self.clr_env = clr_env self.case1_step1 = index.case1_step1 self.case1_step11 = index.case1_step11 self.case1_step2 = index.case1_step2 self.case2_step1 = index.case2_step1 self.case2_step11 = index.case2_step11 self.case2_step2 = index.case2_step2 self.mail_sender = index.mail_sender self.mail_receivers = index.mail_receivers self.mail_cc = index.mail_cc self.mail_bcc = index.mail_bcc self.mail_host = index.mail_host self.mail_port = index.mail_port self.mail_user = index.mail_user self.mail_pass = index.mail_pass self.pop3_email = index.pop3_email self.pop3_pwd = index.pop3_pwd self.pop3_server_host = index.pop3_server_host self.pop3_server_port = index.pop3_server_port self.file = index.file self.attach_path = index.attach_path self.context = index.context self.case1_title1 = index.case1_title1 self.case1_title2 = index.case1_title2 self.case2_title1 = index.case2_title1 self.case2_title2 = index.case2_title2 self.case2_title3 = index.case2_title3 clr_env.clear_env()
def teardown_class(self): # 回收环境 clr_env.clear_env() fun.rbm_close() fun.ssh_close('gw') fun.ssh_close('vlanA') fun.ssh_close('vlanB')
def teardown_method(self): clr_env.clear_env('gw') clr_env.clear_met_acl('gw') fun.send(rbmExc, message.verifymod_expired_DelAuthCert['DelAuthCert'], domain_rmb, base_path) fun.send(rbmExc, message.verifymod_DelAuthCert['DelAuthCert'], domain_rmb, base_path) clr_env.verifymod_teardown_met(base_path)
def setup_class(self): # 获取参数 fun.ssh_gw.connect() self.clr_env = clr_env self.case1_step1 = index.case1_step1 self.case1_step2 = index.case1_step2 self.case1_step11 = index.case1_step11 clr_env.clear_env()
def setup_class(self): # 获取参数 fun.ssh_gw.connect() fun.ssh_c.connect() fun.ssh_s.connect() self.clr_env = clr_env.clear_env self.case1_step = index.case1_step self.case2_step = index.case2_step clr_env.clear_env()
def teardown_class(self): # 回收环境 clr_env.clear_env() fun.pid_kill('8889', process='python3', gw='vlanA') fun.pid_kill('8889', process='python3', gw='gw') fun.send(rbmExc, message.delvlan['SetVlan'], rbmDomain, base_path) fun.rbm_close() fun.ssh_close('gw') fun.ssh_close('vlanA') fun.ssh_close('vlanB')
def setup_class(self): # 获取参数 fun.ssh_gw.connect() fun.ssh_c.connect() fun.ssh_s.connect() self.clr_env = clr_env.clear_env self.case1_step1 = index.case1_step1 self.pkt1_cfg = index.pkt1_cfg self.cap_pcap1 = self.pkt1_cfg["capture"][3] clr_env.clear_env()
def teardown_method(self): clr_env.clear_env('gw') clr_env.clear_met_acl('gw') fun.cmd(self.case_step["step1"][0], 'c') fun.cmd(self.case_step["step1"][0], 's') fun.cmd("rm -f /opt/cipso*.txt", 'c') re1 = fun.cmd("ls /opt/ |grep txt", 'c') assert self.cipso_cat["txt"][0] not in re1
def teardown_method(self): clr_env.clear_env() fun.pid_kill(self.cap_pcap1, 'python', 's') fun.pid_kill(self.cap_pcap3, 'python', 's') fun.pid_kill(self.cap_pcap4, 'python', 's') fun.pid_kill(self.cap_pcap5, 'python', 's') fun.cmd(f"rm -rf /opt/pkt/*pcap", 'gw') re = fun.cmd(f"ls /opt/pkt/", 'gw') print('teardown_method_re:', re)
def setup_class(self): # 获取参数 fun.ssh_gw.connect() fun.ssh_vlanA.connect() fun.ssh_vlanB.connect() self.clr_env = clr_env self.case1_step1 = index.case1_step1 # self.case1_step2 = index.case1_step2 self.case1_step11 = index.case1_step11 self.vlan_clear = index.vlan_clear clr_env.clear_env()
def teardown_method(self): clr_env.clear_env('gw') clr_env.clear_met_acl('gw') fun.cmd(self.case3_step3["step1"][0], 'gw') fun.cmd(self.case1_step6["step1"][1], 'gw') fun.send(rbmExc, message.verifymod_DelAuthCert['DelAuthCert'], domain_rmb, base_path) clr_env.verifymod_teardown_met(base_path) fun.cmd("rm -f /opt/verifymod*.txt", 'c') re1 = fun.cmd("ls /opt/ |grep txt", 'c') assert self.case3_step2["step2"][0] not in re1
def setup_class(self): # 获取参数 fun.ssh_gw.connect() fun.ssh_c.connect() fun.ssh_s.connect() self.clr_env = clr_env.clear_env # self.pre_env=index.pre_env self.case1_step = index.case1_step self.pkt1_cfg = index.pkt1_cfg self.cap_pcap1 = self.pkt1_cfg["capture"][3] self.read_1 = self.pkt1_cfg["read"][0] clr_env.clear_env()
def setup_class(self): # 获取参数 fun.ssh_gw.connect() self.clr_env = clr_env self.case1_step1 = index.case1_step1 self.case1_step2 = index.case1_step2 self.case2_step1 = index.case2_step1 self.case2_step2 = index.case2_step2 self.data = index.data self.case1_data = index.case1_data self.case2_data1 = index.case2_data1 self.case2_data2 = index.case2_data2 clr_env.clear_env()
def setup_class(self): # 获取参数 fun.ssh_gw.connect() self.clr_env = clr_env self.case1_step1 = index.case1_step1 self.case1_step2 = index.case1_step2 self.case1_step3 = index.case1_step3 self.case2_step1 = index.case2_step1 self.case2_step2 = index.case2_step2 self.case3_step1 = index.case3_step1 self.case3_step2 = index.case3_step2 self.vlan_clear = index.vlan_clear clr_env.clear_env()
def setup_class(self): # 获取参数 fun.ssh_gw.connect() self.clr_env = clr_env self.case1_step1 = index.case1_step1 self.case1_step2 = index.case1_step2 self.case2_step1 = index.case2_step1 self.case2_step2 = index.case2_step2 self.delcheck = index.delcheck self.data = index.data self.case1_uri = index.case1_uri self.case2_uri1 = index.case2_uri1 self.case2_uri2 = index.case2_uri2 clr_env.clear_env()
def setup_class(self): # 获取参数 fun.ssh_gw.connect() self.clr_env = clr_env self.case1_step1 = index.case1_step1 self.case1_step11 = index.case1_step11 self.case1_step2 = index.case1_step2 self.case2_step1 = index.case2_step1 self.case2_step11 = index.case2_step11 self.case2_step2 = index.case2_step2 self.delcheck = index.delcheck self.host = index.host self.port = index.port self.username = index.username self.password = index.password self.case1_deny_user = index.case1_deny_user self.case2_deny_user = index.case2_deny_user self.case2_allow_user = index.case2_allow_user clr_env.clear_env()
def setup_class(self): # 获取参数 fun.ssh_gw.connect() self.clr_env = clr_env self.case1_step1 = index.case1_step1 self.case1_step2 = index.case1_step2 self.case2_step1 = index.case2_step1 self.case2_step2 = index.case2_step2 self.case3_step1 = index.case3_step1 self.case3_step2 = index.case3_step2 self.data = index.data self.case1_uri = index.case1_uri self.case2_uri1 = index.case2_uri1 self.case2_uri2 = index.case2_uri2 self.case2_uri3 = index.case2_uri3 self.case2_uri4 = index.case2_uri4 self.case2_uri5 = index.case2_uri5 self.base_uri = index.base_uri clr_env.clear_env()
def setup_class(self): # 获取参数 fun.ssh_gw.connect() self.clr_env = clr_env self.case1_step1 = index.case1_step1 self.case1_step2 = index.case1_step2 self.case2_step1 = index.case2_step1 self.case2_step2 = index.case2_step2 self.delcheck = index.delcheck self.data = index.data self.case1_get_data1 = index.case1_get_data1 self.case1_get_data2 = index.case1_get_data2 self.case1_post_data1 = index.case1_post_data1 self.case1_post_data2 = index.case1_post_data2 self.case1_uri1 = index.case1_uri1 self.case1_uri2 = index.case1_uri2 self.case1_MIME1 = index.case1_MIME1 self.case1_MIME2 = index.case1_MIME2 self.base_uri = index.base_uri clr_env.clear_env()
def teardown_class(self): # 回收环境 clr_env.clear_env() fun.ssh_gw.close() fun.ssh_c.close() fun.ssh_s.close()
def setup_method(self): clr_env.clear_env('gw') clr_env.clear_met_acl('gw')