Skip to content

Commit

Permalink
Merge pull request #2686 from freenas/QE-tkt-77998
Browse files Browse the repository at this point in the history
QE tkt-77998 add global reboot = False and skip all test to reboot after update
  • Loading branch information
ericbsd committed Feb 28, 2019
2 parents 0bcc2e1 + 3bcfe19 commit 17c4eb9
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions tests/api2/update.py
Expand Up @@ -96,15 +96,13 @@ def test_07_get_pending_update():


def test_08_install_update():
global reboot
reboot = False
if update_version is None:
pytest.skip('No update found')
elif download_failed is True:
pytest.skip(f'Downloading {selected_trains} failed')
else:
if vm_name is None and interface == 'vtnet0':
reboot = False
else:
reboot = True
payload = {
"train": selected_trains,
"reboot": reboot
Expand Down Expand Up @@ -149,6 +147,8 @@ def test_11_wait_for_first_reboot_with_bhyve():
pytest.skip('No update found')
elif download_failed is True:
pytest.skip(f'Downloading {selected_trains} failed')
elif reboot is False:
pytest.skip(f'Reboot is False skip')
else:
if vm_name is None:
pytest.skip('skip no vm_name')
Expand All @@ -164,6 +164,8 @@ def test_12_wait_for_second_reboot_with_bhyve():
pytest.skip('No update found')
elif download_failed is True:
pytest.skip(f'Downloading {selected_trains} failed')
elif reboot is False:
pytest.skip(f'Reboot is False skip')
else:
if vm_name is None:
pytest.skip('skip no vm_name')
Expand All @@ -179,6 +181,8 @@ def test_13_wait_for_FreeNAS_to_be_online():
pytest.skip('No update found')
elif download_failed is True:
pytest.skip(f'Downloading {selected_trains} failed')
elif reboot is False:
pytest.skip(f'Reboot is False skip')
else:
while ping_host(ip) is not True:
sleep(5)
Expand All @@ -191,8 +195,8 @@ def test_14_verify_initial_version_is_not_current_FreeNAS_version():
pytest.skip('No update found')
elif download_failed is True:
pytest.skip(f'Downloading {selected_trains} failed')
elif vm_name is None and interface == 'vtnet0':
pytest.skip('VM was not rebooted')
elif reboot is False:
pytest.skip(f'Reboot is False skip')
else:
global results, current_version
results = GET("/system/info/")
Expand All @@ -207,7 +211,7 @@ def test_15_verify_update_version_is_current_version():
pytest.skip('No update found')
elif download_failed is True:
pytest.skip(f'Downloading {selected_trains} failed')
elif vm_name is None and interface == 'vtnet0':
pytest.skip('VM was not rebooted')
elif reboot is False:
pytest.skip(f'Reboot is False skip')
else:
assert update_version == current_version, results.text

0 comments on commit 17c4eb9

Please sign in to comment.