Skip to content

Commit

Permalink
TEST: Use oVirt Tiny Core instead of cirros
Browse files Browse the repository at this point in the history
Signed-off-by: Marcin Sobczyk <[email protected]>
Signed-off-by: Lev Veyde <[email protected]>
  • Loading branch information
tinez authored and lveyde committed May 25, 2022
1 parent 4589bd8 commit 52c21a0
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
8 changes: 8 additions & 0 deletions basic-suite-master/test-scenarios/test_002_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -1211,6 +1211,10 @@ def test_add_blank_vms(engine_api, ost_cluster_name):
high_availability=sdk4.types.HighAvailability(
enabled=False,
),
bios=sdk4.types.Bios(
sdk4.types.BootMenu(False),
sdk4.types.BiosType.Q35_SEA_BIOS,
),
cluster=sdk4.types.Cluster(
name=ost_cluster_name,
),
Expand Down Expand Up @@ -1271,6 +1275,10 @@ def test_add_blank_high_perf_vm2(engine_api, ost_dc_name, ost_cluster_name):
name=TEMPLATE_BLANK,
),
custom_emulated_machine='pc-q35-rhel8.0.0',
bios=sdk4.types.Bios(
sdk4.types.BootMenu(False),
sdk4.types.BiosType.Q35_SEA_BIOS,
),
cpu=sdk4.types.Cpu(
topology=sdk4.types.CpuTopology(
cores=1,
Expand Down
8 changes: 4 additions & 4 deletions basic-suite-master/test-scenarios/test_004_basic_sanity.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
SD_SECOND_NFS_NAME = 'second-nfs'
SD_ISCSI_NAME = 'iscsi'

VM_USER_NAME = 'cirros'
VM_PASSWORD = 'gocubsgo'
VM_USER_NAME = 'tc'
VM_PASSWORD = ''

VM0_NAME = 'vm0'
VM1_NAME = 'vm1'
Expand Down Expand Up @@ -483,7 +483,7 @@ def test_remove_vm2_backup_checkpoints(engine_api, get_vm_service_for_vm):

@pytest.fixture(scope="session")
def vm0_fqdn_or_ip(tested_ip_version, management_subnet):
vm0_address = {'ipv4': VM0_NAME, 'ipv6': str(management_subnet[250])}
vm0_address = {'ipv4': VM0_NAME, 'ipv6': VM0_NAME}
return vm0_address[f'ipv{tested_ip_version}']


Expand Down Expand Up @@ -973,7 +973,7 @@ def test_run_vms(
if tested_ip_version == 6:
vms_service = engine_api.system_service().vms_service()
vm = vms_service.list(search='name={}'.format(VM0_NAME))[0]
cirros_serial_console.add_static_ip(vm.id, f'{vm0_fqdn_or_ip}/64', 'eth0')
# cirros_serial_console.add_static_ip(vm.id, f'{vm0_fqdn_or_ip}/64', 'eth0')

assert_vm_is_alive(vm0_fqdn_or_ip)

Expand Down
5 changes: 5 additions & 0 deletions ost_utils/pytest/fixtures/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ def deploy(
if not request.config.getoption('--skip-custom-repos-check') and not deploy_hosted_engine:
package_mgmt.check_installed_packages(ansible_all)

# TEST: replace cirros with oVirt Tiny Core
ansible_all.shell(
'curl -L -o /var/tmp/cirros.img https://github.com/lveyde/ovirt-tinycore-linux/releases/download/v13.9/oVirtTinyCore64-13.9.qcow2'
)

# report package versions
package_mgmt.report_ovirt_packages_versions(ansible_all)

Expand Down
4 changes: 1 addition & 3 deletions ost_utils/vmconsole.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ def _login(self):
self._pre_login()
self._read_until_prompt('login: ')
self._write(f'{self._user}\n')
self._read_until_prompt('Password: ')
self._write(f'{self._passwd}\n')
self._read_until_bash_prompt()
self._logged_in = True
yield
Expand Down Expand Up @@ -191,7 +189,7 @@ def _write(self, entry):

class CirrosSerialConsole(VmSerialConsole):
def __init__(self, private_key_path, vmconsole_proxy_ip):
super(CirrosSerialConsole, self).__init__(private_key_path, vmconsole_proxy_ip, 'cirros', 'gocubsgo')
super(CirrosSerialConsole, self).__init__(private_key_path, vmconsole_proxy_ip, 'tc', '')

def assign_ip4_if_missing(self, vm_id, iface):
ip = self.get_ip(vm_id, iface, 4)
Expand Down

0 comments on commit 52c21a0

Please sign in to comment.