def test_system_boot(qemu): version = rancheros_version() print('parsed version: ' + version) for ln in u.iter_lines(qemu.stdout): ros_booted_substr = str.find(ln, 'RancherOS {v} started'.format(v=version)) print(str.strip(ln)) if ros_booted_substr > -1: assert True return assert False
def test_system_boot(qemu): version = u.rancheros_version('./build.conf') print('parsed version: ' + version) def has_ros_started_substr(s): return str.find(s, 'RancherOS {v} started'.format(v=version)) > -1 for _ in it.ifilter(has_ros_started_substr, it.imap(u.with_effect(print), u.iter_lines(qemu.stdout))): assert True return assert False
def test_run_system_container(qemu): 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) for ln in u.iter_lines(ssh.stdout): print(ln) ssh.wait() assert ssh.returncode == 0