1
0
mirror of https://github.com/rancher/os.git synced 2025-07-06 03:26:12 +00:00
os/tests/integration/rancherostest/test_system.py
2015-05-10 17:46:09 +05:00

26 lines
581 B
Python

import pytest
import string
import subprocess
@pytest.fixture(scope="module")
def qemu(request):
p = subprocess.Popen('./scripts/run', stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
def fin():
p.stdout.close()
p.terminate()
request.addfinalizer(fin)
return p
@pytest.mark.timeout(20)
def test_system_boot(qemu):
for ln in iter(qemu.stdout.readline, ''):
l = string.strip(ln)
ros_booted_substr = string.find(l, 'RancherOS v0.3.1-rc2 started')
if ros_booted_substr > -1:
assert True
return