def test_many_cont_networks(): util.log( """[START TEST] start 2 containers run simple networking tests in each one. Warning: stop network manager before running all network tests""" ) cont1_ip = '192.168.1.1' host1_ip = '192.168.1.2' cont1_pid = aucont.start_daemonized( util.test_rootfs_path(), '/bin/sleep', '10000', cont_ip=cont1_ip ) cont2_ip = '10.0.0.1' host2_ip = '10.0.0.2' cont2_pid = aucont.start_daemonized( util.test_rootfs_path(), '/bin/sleep', '10000', cont_ip=cont2_ip ) time.sleep(2) aucont.exec_capture_output(cont1_pid, '/test/net/test.sh', cont1_ip, host1_ip ) aucont.exec_capture_output(cont1_pid, '/test/net/test.sh', cont1_ip, host1_ip ) cleanup()
def test_many_cont_networks(): util.log("""[START TEST] start 2 containers run simple networking tests in each one. Warning: stop network manager before running all network tests""") cont1_ip = '192.168.1.1' host1_ip = '192.168.1.2' cont1_pid = aucont.start_daemonized(util.test_rootfs_path(), '/bin/sleep', '10000', cont_ip=cont1_ip) cont2_ip = '10.0.0.1' host2_ip = '10.0.0.2' cont2_pid = aucont.start_daemonized(util.test_rootfs_path(), '/bin/sleep', '10000', cont_ip=cont2_ip) time.sleep(2) aucont.exec_capture_output(cont1_pid, '/test/net/test.sh', cont1_ip, host1_ip) aucont.exec_capture_output(cont1_pid, '/test/net/test.sh', cont1_ip, host1_ip) cleanup()
def test_daemonization(): util.log("""[START_TEST] check that daemonized container doesn't use tty""") cont_pid = aucont.start_daemonized(util.test_rootfs_path(), '/test/interactive/bin/test') time.sleep(1) output = aucont.exec_capture_output(cont_pid, "/bin/cat", "/test/interactive/bin/result.txt") aucont.stop(cont_pid, 9) output = output.strip() util.debug(output) util.check(output != 'Ok')
def test_daemonization(): util.log("""[START_TEST] check that daemonized container doesn't use tty""") cont_pid = aucont.start_daemonized( util.test_rootfs_path(), '/test/interactive/bin/test' ) time.sleep(1) output = aucont.exec_capture_output( cont_pid, "/bin/cat", "/test/interactive/bin/result.txt" ) aucont.stop(cont_pid, 9) output = output.strip() util.debug(output) util.check(output != 'Ok')