mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-03-08 04:58:29 +03:00
tests: bypass cache hacking for test:///default
To allow us to test the standard code in some cases. Would have caught the previous issue
This commit is contained in:
parent
ec0d3072c0
commit
f0e36d52e7
@ -36,8 +36,6 @@ os.environ["LANG"] = "en_US.UTF-8"
|
||||
os.environ["HOME"] = "/tmp"
|
||||
os.environ["DISPLAY"] = ":3.4"
|
||||
|
||||
_defaultconn = utils.open_testdefault()
|
||||
|
||||
# Location
|
||||
image_prefix = "/tmp/__virtinst_cli_"
|
||||
xmldir = "tests/cli-test-xml"
|
||||
|
@ -84,6 +84,11 @@ def openconn(uri):
|
||||
virtinst.util.register_libvirt_error_handler()
|
||||
conn = virtinst.cli.getConnection(uri)
|
||||
|
||||
# For the basic test:///default URI, skip this caching, so we have
|
||||
# an option to test the stock code
|
||||
if uri == uri_test_default:
|
||||
return conn
|
||||
|
||||
if uri not in _conn_cache:
|
||||
conn.fetch_all_guests()
|
||||
conn.fetch_all_pools()
|
||||
|
Loading…
x
Reference in New Issue
Block a user