Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

Commit

Permalink
Merge pull request #8231 from john-dupuy/fix-test-alert-hardware-for-…
Browse files Browse the repository at this point in the history
…vsphere6.7

[1LP][RFR] Update vddk_url() fixtures in test_compliance, test_actions, & test_alerts
  • Loading branch information
izapolsk committed Dec 4, 2018
2 parents 8e4ddf4 + 947bb5e commit 904eff2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
10 changes: 7 additions & 3 deletions cfme/tests/control/test_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,14 @@ def vddk_url(provider):
major = str(provider.version)
minor = "0"
vddk_version = "v{}_{}".format(major, minor)
try:
return conf.cfme_data.get("basic_info").get("vddk_url").get(vddk_version)
except AttributeError:
# cf. BZ 1651702 vddk_version 6_7 does not currently work with CFME, so use v6_5
if BZ(1651702, forced_streams=['5.9','5.10']).blocks:
vddk_version = "v6_5"
url = cfme_data.get("basic_info").get("vddk_url").get(vddk_version)
if url is None:
pytest.skip("There is no vddk url for this VMware provider version")
else:
return url


@pytest.fixture(scope="function")
Expand Down
2 changes: 1 addition & 1 deletion cfme/tests/control/test_alerts.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def vddk_url(provider):
minor = "0"
vddk_version = "v{}_{}".format(major, minor)
# cf. BZ 1651702 vddk_version 6_7 does not currently work with CFME, so use v6_5
if BZ(1651702).blocks:
if BZ(1651702, forced_streams=['5.9','5.10']).blocks:
vddk_version = "v6_5"
url = cfme_data.get("basic_info").get("vddk_url").get(vddk_version)
if url is None:
Expand Down
12 changes: 8 additions & 4 deletions cfme/tests/control/test_compliance.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,16 @@ def vddk_url(provider):
major, minor = str(provider.version).split(".")
except ValueError:
major = str(provider.version)
minor = 0
minor = "0"
vddk_version = "v{}_{}".format(major, minor)
try:
return conf.cfme_data.get("basic_info").get("vddk_url").get(vddk_version)
except AttributeError:
# cf. BZ 1651702 vddk_version 6_7 does not currently work with CFME, so use v6_5
if BZ(1651702, forced_streams=['5.9','5.10']).blocks:
vddk_version = "v6_5"
url = cfme_data.get("basic_info").get("vddk_url").get(vddk_version)
if url is None:
pytest.skip("There is no vddk url for this VMware provider version")
else:
return url


@pytest.fixture(scope="module")
Expand Down

0 comments on commit 904eff2

Please sign in to comment.