From 72b29cc797685bbf307fe25412129fa31ea81cf1 Mon Sep 17 00:00:00 2001 From: Ivan Mikushin Date: Thu, 7 May 2015 22:27:17 +0500 Subject: [PATCH] test_run_system_container: fixed --- tests/integration/rancherostest/test_system.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/integration/rancherostest/test_system.py b/tests/integration/rancherostest/test_system.py index fc5d5397..983dc7d7 100644 --- a/tests/integration/rancherostest/test_system.py +++ b/tests/integration/rancherostest/test_system.py @@ -1,6 +1,7 @@ import pytest import string import subprocess +import time @pytest.fixture(scope="module") @@ -8,7 +9,7 @@ def qemu(request): p = subprocess.Popen('./scripts/run', stdout=subprocess.PIPE, stderr=subprocess.STDOUT) def fin(): - print('\nTerminating QEMU!!!') + print('\nTerminating QEMU') p.stdout.close() p.terminate() @@ -20,22 +21,24 @@ def qemu(request): def test_system_boot(qemu): for ln in iter(qemu.stdout.readline, ''): ros_booted_substr = string.find(ln, 'RancherOS v0.3.1-rc2 started') + print(string.strip(ln)) if ros_booted_substr > -1: assert True return assert False -@pytest.mark.timeout(20) +@pytest.mark.timeout(40) def test_run_system_container(qemu): assert qemu.returncode is None + time.sleep(1) # or else ssh will fail (WTF?!) ssh = subprocess.Popen( './scripts/ssh sudo system-docker run --rm busybox /bin/true', shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) try: for ln in iter(ssh.stdout.readline, ''): - print(ln) + print(string.strip(ln)) pass ssh.wait() assert ssh.returncode == 0