1
0
mirror of https://github.com/rancher/os.git synced 2025-09-05 00:37:12 +00:00

Modify the tests to work with multiple architectures

This commit is contained in:
Ivan Mikushin
2016-03-30 17:48:31 -07:00
parent 99c3207b14
commit 95d24ac67d
7 changed files with 28 additions and 15 deletions

View File

@@ -14,10 +14,13 @@ def qemu(request):
return q
nginx = {'amd64': 'nginx', 'arm': 'armhfbuild/nginx', 'arm64': 'armhfbuild/nginx'}
@pytest.mark.timeout(40)
def test_reboot_with_container_running(qemu):
u.wait_for_ssh(qemu, ssh_command)
subprocess.check_call(ssh_command + ['docker', 'run', '-d', '--restart=always', 'nginx'],
subprocess.check_call(ssh_command + ['docker', 'run', '-d', '--restart=always', nginx[u.arch]],
stderr=subprocess.STDOUT, universal_newlines=True)
subprocess.call(ssh_command + ['sudo', 'reboot'],