mirror of
https://github.com/rancher/os.git
synced 2025-08-31 22:32:14 +00:00
Merge pull request #646 from imikushin/fix-test-05
Wait for docker in test_05
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import pytest
|
||||
import rancherostest.util as u
|
||||
import subprocess
|
||||
import time
|
||||
|
||||
|
||||
ssh_command = ['./scripts/ssh', '--qemu', '--key', './tests/integration/assets/test.key']
|
||||
@@ -18,13 +17,13 @@ def test_system_docker_survives_custom_docker_install(qemu):
|
||||
assert qemu is not None
|
||||
u.wait_for_ssh(ssh_command)
|
||||
subprocess.check_call(ssh_command + ['curl', '-OL',
|
||||
'https://test.docker.com/builds/Linux/x86_64/docker-1.9.0-rc4'],
|
||||
'https://get.docker.com/builds/Linux/x86_64/docker-1.9.0'],
|
||||
stderr=subprocess.STDOUT, universal_newlines=True)
|
||||
|
||||
subprocess.check_call(ssh_command + ['chmod', '+x', '/home/rancher/docker-1.9.0-rc4'],
|
||||
subprocess.check_call(ssh_command + ['chmod', '+x', '/home/rancher/docker-1.9.0'],
|
||||
stderr=subprocess.STDOUT, universal_newlines=True)
|
||||
|
||||
subprocess.check_call(ssh_command + ['sudo', 'ln', '-sf', '/home/rancher/docker-1.9.0-rc4', '/usr/bin/docker'],
|
||||
subprocess.check_call(ssh_command + ['sudo', 'ln', '-sf', '/home/rancher/docker-1.9.0', '/usr/bin/docker'],
|
||||
stderr=subprocess.STDOUT, universal_newlines=True)
|
||||
|
||||
subprocess.check_call(ssh_command + ['sudo', 'system-docker', 'restart', 'docker'],
|
||||
@@ -32,7 +31,5 @@ def test_system_docker_survives_custom_docker_install(qemu):
|
||||
|
||||
subprocess.check_call(ssh_command + ['sudo', 'system-docker', 'version'],
|
||||
stderr=subprocess.STDOUT, universal_newlines=True)
|
||||
time.sleep(3)
|
||||
|
||||
subprocess.check_call(ssh_command + ['docker', 'version'],
|
||||
stderr=subprocess.STDOUT, universal_newlines=True)
|
||||
u.wait_for_ssh(ssh_command)
|
||||
|
Reference in New Issue
Block a user