From 1f5b50f489a775beb165d175510785637b8d2f2b Mon Sep 17 00:00:00 2001 From: Ivan Mikushin Date: Fri, 8 May 2015 16:23:12 +0500 Subject: [PATCH] test_ssh_authorized_keys --- tests/integration/rancherostest/test_00_system.py | 4 ++-- .../integration/rancherostest/test_01_cloud_config.py | 11 +++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/integration/rancherostest/test_00_system.py b/tests/integration/rancherostest/test_00_system.py index 1df720a1..920d2bfe 100644 --- a/tests/integration/rancherostest/test_00_system.py +++ b/tests/integration/rancherostest/test_00_system.py @@ -31,9 +31,9 @@ def test_system_boot(qemu): @pytest.mark.timeout(60) def test_run_system_container(qemu): - assert qemu.returncode is None - + assert qemu is not None u.wait_for_ssh() + ssh = subprocess.Popen( './scripts/ssh sudo system-docker run --rm busybox /bin/true', shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True) diff --git a/tests/integration/rancherostest/test_01_cloud_config.py b/tests/integration/rancherostest/test_01_cloud_config.py index 0ca44798..b94e8e28 100644 --- a/tests/integration/rancherostest/test_01_cloud_config.py +++ b/tests/integration/rancherostest/test_01_cloud_config.py @@ -13,8 +13,15 @@ def qemu(request): @pytest.mark.timeout(40) -def test_check_whats_going_on(qemu): - assert qemu.returncode is None +def test_ssh_authorized_keys(qemu): + assert qemu is not None + u.wait_for_ssh(ssh_command) + assert True + + +@pytest.mark.timeout(40) +def test_rancher_environment(qemu): + assert qemu is not None u.wait_for_ssh(ssh_command) ssh = subprocess.Popen(