mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
tests: Clean up URI building and naming
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
@@ -76,13 +76,13 @@ def testNewVMMultiConnection(app):
|
||||
return app.manager_createconn(uri)
|
||||
|
||||
# Test empty qemu connection
|
||||
_add_conn(tests.utils.URIs.kvm + _capsopt("test-empty.xml"))
|
||||
_add_conn(tests.utils.URIs.kvm_x86 + _capsopt("test-empty.xml"))
|
||||
newvm = _open_newvm(app)
|
||||
newvm.find(".*No hypervisor options were found.*KVM kernel modules.*")
|
||||
newvm.window_close()
|
||||
app.manager_conn_disconnect("QEMU/KVM")
|
||||
|
||||
_add_conn(tests.utils.URIs.kvm_session +
|
||||
_add_conn(tests.utils.URIs.kvm_x86_session +
|
||||
_capsopt("test-qemu-no-kvm.xml"))
|
||||
newvm = _open_newvm(app)
|
||||
newvm.find(".*KVM is not available.*")
|
||||
@@ -375,7 +375,7 @@ def testNewVMURL(app):
|
||||
New VM with URL and distro detection, plus having fun with
|
||||
the storage browser and network selection.
|
||||
"""
|
||||
app.uri = tests.utils.URIs.kvm
|
||||
app.uri = tests.utils.URIs.kvm_x86
|
||||
newvm = _open_newvm(app)
|
||||
|
||||
newvm.find_fuzzy("Network Install", "radio").click()
|
||||
@@ -448,7 +448,7 @@ def testNewKVMQ35Tweaks(app):
|
||||
"""
|
||||
New VM that should default to Q35, but tweak things a bunch
|
||||
"""
|
||||
app.uri = tests.utils.URIs.kvm
|
||||
app.uri = tests.utils.URIs.kvm_x86
|
||||
newvm = _open_newvm(app)
|
||||
|
||||
newvm.find_fuzzy("Import", "radio").click()
|
||||
@@ -513,7 +513,7 @@ def testNewKVMQ35UEFI(app):
|
||||
"""
|
||||
New VM that should default to Q35, and set UEFI
|
||||
"""
|
||||
app.uri = tests.utils.URIs.kvm
|
||||
app.uri = tests.utils.URIs.kvm_x86
|
||||
newvm = _open_newvm(app)
|
||||
|
||||
newvm.find_fuzzy("Import", "radio").click()
|
||||
@@ -549,7 +549,7 @@ def testNewPPC64(app):
|
||||
"""
|
||||
New PPC64 VM to test architecture selection
|
||||
"""
|
||||
app.uri = tests.utils.URIs.kvm
|
||||
app.uri = tests.utils.URIs.kvm_x86
|
||||
newvm = _open_newvm(app)
|
||||
|
||||
newvm.find_fuzzy("Architecture options", "toggle").click()
|
||||
@@ -1167,7 +1167,7 @@ def testNewVMSession(app):
|
||||
"""
|
||||
Test with fake qemu session
|
||||
"""
|
||||
app.uri = tests.utils.URIs.kvm_session
|
||||
app.uri = tests.utils.URIs.kvm_x86_session
|
||||
newvm = _open_newvm(app)
|
||||
|
||||
newvm.find_fuzzy("Import", "radio").click()
|
||||
|
||||
@@ -184,7 +184,7 @@ def testDeleteRemoteManyDevices(app):
|
||||
"""
|
||||
Test with a remote VM to hit a certain code path
|
||||
"""
|
||||
app.uri = tests.utils.URIs.kvm_remote
|
||||
app.uri = tests.utils.URIs.kvm_x86_remote
|
||||
_testDeleteManyDevices(app)
|
||||
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ def testDetailsStateMisc(app):
|
||||
"""
|
||||
Test state changes and unapplied changes warnings
|
||||
"""
|
||||
app.uri = tests.utils.URIs.kvm
|
||||
app.uri = tests.utils.URIs.kvm_x86
|
||||
win = app.manager_open_details("test", shutdown=True)
|
||||
fmenu = win.find("File", "menu")
|
||||
fmenu.click()
|
||||
@@ -164,7 +164,7 @@ def testDetailsEditDomain1(app):
|
||||
"""
|
||||
Test overview, memory, cpu pages
|
||||
"""
|
||||
app.uri = tests.utils.URIs.kvm_cpu_insecure
|
||||
app.uri = tests.utils.URIs.kvm_x86_cpu_insecure
|
||||
win = app.manager_open_details("test")
|
||||
appl = win.find("config-apply", "push button")
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ def _testVMLifecycle(app):
|
||||
|
||||
def testVMLifecycle(app):
|
||||
# qemu hits some different domain code paths for setTime
|
||||
app.uri = tests.utils.URIs.kvm
|
||||
app.uri = tests.utils.URIs.kvm_x86
|
||||
_testVMLifecycle(app)
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ def testManagerQEMUSetTime(app):
|
||||
"""
|
||||
Fake qemu setTime behavior for code coverage
|
||||
"""
|
||||
app.uri = tests.utils.URIs.kvm
|
||||
app.uri = tests.utils.URIs.kvm_x86
|
||||
manager = app.topwin
|
||||
run = manager.find("Run", "push button")
|
||||
smenu = manager.find("Menu", "toggle button")
|
||||
|
||||
@@ -16,7 +16,7 @@ def _open_migrate(app, vmname):
|
||||
|
||||
def testMigrateQemu(app):
|
||||
# Use fake qemu connections
|
||||
app.uri = tests.utils.URIs.kvm
|
||||
app.uri = tests.utils.URIs.kvm_x86
|
||||
newuri = (tests.utils.URIs.test_default +
|
||||
",fakeuri=qemu+tcp://fakehost/system")
|
||||
app.manager_createconn(newuri)
|
||||
|
||||
@@ -19,7 +19,7 @@ def testSystrayFake(app):
|
||||
manager = app.root.find("Virtual Machine Manager", check_active=False)
|
||||
|
||||
# Add a connection to trigger systray update
|
||||
uri = tests.utils.URIs.kvm
|
||||
uri = tests.utils.URIs.kvm_x86
|
||||
manager.grab_focus()
|
||||
app.manager_createconn(uri=uri)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user