From 8251edc642ffc373aa2a8ca703b99acb4bc91000 Mon Sep 17 00:00:00 2001 From: Ivan Mikushin Date: Thu, 12 Nov 2015 12:06:38 +0500 Subject: [PATCH] Wait for docker in test_05 --- .../test_05_custom_docker_in_persistent_console.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/integration/rancherostest/test_05_custom_docker_in_persistent_console.py b/tests/integration/rancherostest/test_05_custom_docker_in_persistent_console.py index 4321ac5a..fcd98332 100644 --- a/tests/integration/rancherostest/test_05_custom_docker_in_persistent_console.py +++ b/tests/integration/rancherostest/test_05_custom_docker_in_persistent_console.py @@ -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)