summaryrefslogtreecommitdiffstats
path: root/roles/openshift_master_facts/test/openshift_master_facts_bad_input_tests.py
diff options
context:
space:
mode:
authorMichael Gugino <mgugino@redhat.com>2018-01-04 23:55:34 -0500
committerMichael Gugino <mgugino@redhat.com>2018-01-10 11:34:36 -0500
commitd3fefc32a727fe3c13159c4e9fe4399f35b487a8 (patch)
tree3211ffc7fa4c8df9ff93928e705ef5314d339f3c /roles/openshift_master_facts/test/openshift_master_facts_bad_input_tests.py
parentee2d4b8e66a344e8f6ca12cbc9362a80a07555d0 (diff)
downloadopenshift-d3fefc32a727fe3c13159c4e9fe4399f35b487a8.tar.gz
openshift-d3fefc32a727fe3c13159c4e9fe4399f35b487a8.tar.bz2
openshift-d3fefc32a727fe3c13159c4e9fe4399f35b487a8.tar.xz
openshift-d3fefc32a727fe3c13159c4e9fe4399f35b487a8.zip
Move more plugins to lib_utils
This commit continues moving plugins into lib_utils. This commit does not move any plugins for add-on roles such as logging and metrics.
Diffstat (limited to 'roles/openshift_master_facts/test/openshift_master_facts_bad_input_tests.py')
-rw-r--r--roles/openshift_master_facts/test/openshift_master_facts_bad_input_tests.py57
1 files changed, 0 insertions, 57 deletions
diff --git a/roles/openshift_master_facts/test/openshift_master_facts_bad_input_tests.py b/roles/openshift_master_facts/test/openshift_master_facts_bad_input_tests.py
deleted file mode 100644
index e8da1e04a..000000000
--- a/roles/openshift_master_facts/test/openshift_master_facts_bad_input_tests.py
+++ /dev/null
@@ -1,57 +0,0 @@
-import copy
-import os
-import sys
-
-from ansible.errors import AnsibleError
-import pytest
-
-sys.path.insert(1, os.path.join(os.path.dirname(__file__), os.pardir, "lookup_plugins"))
-
-from openshift_master_facts_default_predicates import LookupModule # noqa: E402
-
-
-class TestOpenShiftMasterFactsBadInput(object):
- lookup = LookupModule()
- default_facts = {
- 'openshift': {
- 'common': {}
- }
- }
-
- def test_missing_openshift_facts(self):
- with pytest.raises(AnsibleError):
- facts = {}
- self.lookup.run(None, variables=facts)
-
- def test_missing_deployment_type(self):
- with pytest.raises(AnsibleError):
- facts = copy.deepcopy(self.default_facts)
- facts['openshift']['common']['short_version'] = '10.10'
- self.lookup.run(None, variables=facts)
-
- def test_missing_short_version_and_missing_openshift_release(self):
- with pytest.raises(AnsibleError):
- facts = copy.deepcopy(self.default_facts)
- facts['openshift']['common']['deployment_type'] = 'origin'
- self.lookup.run(None, variables=facts)
-
- def test_unknown_deployment_types(self):
- with pytest.raises(AnsibleError):
- facts = copy.deepcopy(self.default_facts)
- facts['openshift']['common']['short_version'] = '1.1'
- facts['openshift']['common']['deployment_type'] = 'bogus'
- self.lookup.run(None, variables=facts)
-
- def test_unknown_origin_version(self):
- with pytest.raises(AnsibleError):
- facts = copy.deepcopy(self.default_facts)
- facts['openshift']['common']['short_version'] = '0.1'
- facts['openshift']['common']['deployment_type'] = 'origin'
- self.lookup.run(None, variables=facts)
-
- def test_unknown_ocp_version(self):
- with pytest.raises(AnsibleError):
- facts = copy.deepcopy(self.default_facts)
- facts['openshift']['common']['short_version'] = '0.1'
- facts['openshift']['common']['deployment_type'] = 'openshift-enterprise'
- self.lookup.run(None, variables=facts)