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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user