|
@@ -86,14 +86,14 @@ class TestOpenShiftMasterFactsDefaultPredicates(object):
|
|
|
|
|
|
def test_openshift_version(self):
|
|
|
for zones_enabled in (True, False):
|
|
|
- for release, deployment_type, default_priorities in TEST_VARS:
|
|
|
- release = release + '.1'
|
|
|
- yield self.check_defaults_version, release, deployment_type, default_priorities, zones_enabled
|
|
|
+ for version, deployment_type, default_priorities in TEST_VARS:
|
|
|
+ version = version + '.1'
|
|
|
+ yield self.check_defaults_version, version, deployment_type, default_priorities, zones_enabled
|
|
|
|
|
|
- def check_defaults_version(self, release, deployment_type, default_priorities,
|
|
|
+ def check_defaults_version(self, version, deployment_type, default_priorities,
|
|
|
zones_enabled):
|
|
|
facts = copy.deepcopy(self.default_facts)
|
|
|
- facts['openshift_version'] = release
|
|
|
+ facts['openshift_version'] = version
|
|
|
facts['openshift']['common']['deployment_type'] = deployment_type
|
|
|
results = self.lookup.run(None, variables=facts, zones_enabled=zones_enabled)
|
|
|
if zones_enabled:
|
|
@@ -109,8 +109,7 @@ class TestOpenShiftMasterFactsDefaultPredicates(object):
|
|
|
def test_v_release_defaults(self):
|
|
|
for zones_enabled in (True, False):
|
|
|
for release, deployment_type, default_priorities in TEST_VARS:
|
|
|
- release = 'v' + release
|
|
|
- yield self.check_defaults_release, release, deployment_type, default_priorities, zones_enabled
|
|
|
+ yield self.check_defaults_release, 'v' + release, deployment_type, default_priorities, zones_enabled
|
|
|
|
|
|
def test_trunc_openshift_release(self):
|
|
|
for release, deployment_type, default_priorities in TEST_VARS:
|
|
@@ -133,10 +132,10 @@ class TestOpenShiftMasterFactsDefaultPredicates(object):
|
|
|
for short_version, deployment_type, default_priorities in TEST_VARS:
|
|
|
yield self.check_defaults_short_version, short_version, deployment_type, default_priorities, zones_enabled
|
|
|
|
|
|
- def check_defaults_short_version(self, release, deployment_type,
|
|
|
+ def check_defaults_short_version(self, short_version, deployment_type,
|
|
|
default_priorities, zones_enabled):
|
|
|
facts = copy.deepcopy(self.default_facts)
|
|
|
- facts['openshift']['common']['short_version'] = release
|
|
|
+ facts['openshift']['common']['short_version'] = short_version
|
|
|
facts['openshift']['common']['deployment_type'] = deployment_type
|
|
|
results = self.lookup.run(None, variables=facts, zones_enabled=zones_enabled)
|
|
|
if zones_enabled:
|
|
@@ -144,18 +143,18 @@ class TestOpenShiftMasterFactsDefaultPredicates(object):
|
|
|
else:
|
|
|
assert_equal(results, default_priorities)
|
|
|
|
|
|
- def test_release_kwarg(self):
|
|
|
+ def test_short_version_kwarg(self):
|
|
|
for zones_enabled in (True, False):
|
|
|
for short_version, deployment_type, default_priorities in TEST_VARS:
|
|
|
yield self.check_defaults_short_version_kwarg, short_version, deployment_type, default_priorities, zones_enabled
|
|
|
|
|
|
- def check_defaults_short_version_kwarg(self, release, deployment_type,
|
|
|
+ def check_defaults_short_version_kwarg(self, short_version, deployment_type,
|
|
|
default_priorities, zones_enabled):
|
|
|
facts = copy.deepcopy(self.default_facts)
|
|
|
facts['openshift']['common']['deployment_type'] = deployment_type
|
|
|
results = self.lookup.run(None, variables=facts,
|
|
|
zones_enabled=zones_enabled,
|
|
|
- short_version=release)
|
|
|
+ short_version=short_version)
|
|
|
if zones_enabled:
|
|
|
assert_equal(results, default_priorities + [ZONE_PRIORITY])
|
|
|
else:
|
|
@@ -166,10 +165,10 @@ class TestOpenShiftMasterFactsDefaultPredicates(object):
|
|
|
for short_version, deployment_type, default_priorities in TEST_VARS:
|
|
|
yield self.check_defaults_deployment_type_kwarg, short_version, deployment_type, default_priorities, zones_enabled
|
|
|
|
|
|
- def check_defaults_deployment_type_kwarg(self, release, deployment_type,
|
|
|
+ def check_defaults_deployment_type_kwarg(self, short_version, deployment_type,
|
|
|
default_priorities, zones_enabled):
|
|
|
facts = copy.deepcopy(self.default_facts)
|
|
|
- facts['openshift']['common']['short_version'] = release
|
|
|
+ facts['openshift']['common']['short_version'] = short_version
|
|
|
results = self.lookup.run(None, variables=facts,
|
|
|
zones_enabled=zones_enabled,
|
|
|
deployment_type=deployment_type)
|
|
@@ -183,12 +182,12 @@ class TestOpenShiftMasterFactsDefaultPredicates(object):
|
|
|
for short_version, deployment_type, default_priorities in TEST_VARS:
|
|
|
yield self.check_defaults_only_kwargs, short_version, deployment_type, default_priorities, zones_enabled
|
|
|
|
|
|
- def check_defaults_only_kwargs(self, release, deployment_type,
|
|
|
+ def check_defaults_only_kwargs(self, short_version, deployment_type,
|
|
|
default_priorities, zones_enabled):
|
|
|
facts = copy.deepcopy(self.default_facts)
|
|
|
results = self.lookup.run(None, variables=facts,
|
|
|
zones_enabled=zones_enabled,
|
|
|
- short_version=release,
|
|
|
+ short_version=short_version,
|
|
|
deployment_type=deployment_type)
|
|
|
if zones_enabled:
|
|
|
assert_equal(results, default_priorities + [ZONE_PRIORITY])
|