diff options
author | Cole Robinson <crobinso@redhat.com> | 2017-08-30 10:36:37 -0400 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2017-08-30 10:36:37 -0400 |
commit | f0e36d52e704c3539b27593ce9cb51844930d2eb (patch) | |
tree | dd0c65815d02d6c786198f67c16608831dc8f946 /tests | |
parent | ec0d3072c07165afa46c663267decb366a66457d (diff) | |
download | virt-manager-f0e36d52e704c3539b27593ce9cb51844930d2eb.tar.gz |
tests: bypass cache hacking for test:///default
To allow us to test the standard code in some cases. Would have caught
the previous issue
Diffstat (limited to 'tests')
-rw-r--r-- | tests/clitest.py | 2 | ||||
-rw-r--r-- | tests/utils.py | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/tests/clitest.py b/tests/clitest.py index 3fe2d7f0..56148cc0 100644 --- a/tests/clitest.py +++ b/tests/clitest.py @@ -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" diff --git a/tests/utils.py b/tests/utils.py index 4c8547bb..7397d369 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -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() |