1
0
mirror of https://github.com/rancher/os.git synced 2025-09-12 21:23:13 +00:00

Fix installer build

This commit is contained in:
Ivan Mikushin
2016-06-13 16:33:07 -07:00
parent 07d475cecb
commit a640bdb758
8 changed files with 27 additions and 26 deletions

View File

@@ -2,6 +2,7 @@ import subprocess
import pytest
import rostest.util as u
from rostest.util import SSH
ssh_command = ['./scripts/ssh', '--qemu']
@@ -16,12 +17,16 @@ def qemu(request):
@pytest.mark.timeout(40)
def test_ros_install_on_formatted_disk(qemu):
u.wait_for_ssh(qemu, ssh_command)
subprocess.check_call(ssh_command + ['sudo', 'mkfs.ext4', '/dev/vda'],
stderr=subprocess.STDOUT, universal_newlines=True)
subprocess.check_call(ssh_command + ['sudo', 'ros', 'install', '-f', '--no-reboot', '-d', '/dev/vda',
'-i', 'rancher/os:v0.4.4-dev' + u.suffix],
stderr=subprocess.STDOUT, universal_newlines=True)
subprocess.check_call(
['sh', '-c', 'docker save rancher/os:%s%s | ./scripts/ssh sudo system-docker load' % (u.version, u.suffix)],
stderr=subprocess.STDOUT, universal_newlines=True)
SSH(qemu, ssh_command).check_call('''
set -e -x
sudo mkfs.ext4 /dev/vda
sudo ros install -f --no-reboot -d /dev/vda -i rancher/os:%s%s
'''.strip() % (u.version, u.suffix))
subprocess.call(ssh_command + ['sudo', 'reboot'],
stderr=subprocess.STDOUT, universal_newlines=True)