1、修改测试结果输出文件
This commit is contained in:
@@ -76,6 +76,8 @@ services:
|
||||
ifconfig eth0 hw ether 02:42:C0:A8:FD:03
|
||||
arp -i eth0 -s 192.0.2.130 02:42:c0:a8:fd:82
|
||||
arp -i eth0 -s 192.0.2.131 02:42:C0:A8:FD:83
|
||||
mkdir -p /root/result_self_test/unittest
|
||||
mkdir -p /root/result_self_test/con_traffic_inject
|
||||
cp -rf /root/cafile_dict/certs/sets/current/gen/crt/ca-root.crt /usr/local/share/ca-certificates
|
||||
update-ca-certificates
|
||||
cat /root/unittest/badssl.test.hosts >> /etc/hosts
|
||||
|
||||
@@ -95,6 +95,7 @@ if __name__ == '__main__':
|
||||
while True:
|
||||
ssl = SSLBuild()
|
||||
ssl.ssl_intercept()
|
||||
with open("/root/result_self_test/result_con_traffic_inject.txt","w+") as f:
|
||||
logpath = "/root/result_self_test/con_traffic_inject/con_traffic_inject_result.log." + time.strftime("%Y-%m-%d",time.localtime())
|
||||
with open(logpath,"w+") as f:
|
||||
f.write(json.dumps(ssl.resultlist, sort_keys=True, indent=4, separators=(',', ': ')))
|
||||
time.sleep(1)
|
||||
|
||||
@@ -385,9 +385,10 @@ if __name__ == '__main__':
|
||||
suite.addTest(SslUnitTest('test_http_replace'))
|
||||
suite.addTest(SslUnitTest('test_http_hijack'))
|
||||
suite.addTest(SslUnitTest('test_http_insert'))
|
||||
with open("/root/result_self_test/unittest_result.txt","w+") as f:
|
||||
while True:
|
||||
logpath = "/root/result_self_test/unittest/unittest_result.log." + time.strftime("%Y-%m-%d",time.localtime())
|
||||
with open(logpath,"w+") as f:
|
||||
runner = unittest.TextTestRunner(stream=f,verbosity=2)
|
||||
while 1:
|
||||
f.write("Test start time: ")
|
||||
f.write(time.asctime(time.localtime(time.time())))
|
||||
f.write("\n")
|
||||
|
||||
Reference in New Issue
Block a user