diff options
author | Rodolfo Carvalho <rhcarvalho@gmail.com> | 2017-07-13 19:44:41 +0200 |
---|---|---|
committer | Rodolfo Carvalho <rhcarvalho@gmail.com> | 2017-07-17 11:30:19 +0200 |
commit | a6dbc9ff06b6a245317de6279e7b3c88ff0ef1c3 (patch) | |
tree | 8367d277a8edddf6b2d00a10346a4174e5431832 /roles/openshift_health_checker | |
parent | 163d440065fa1db79f0900a859007c9d8873a40d (diff) | |
download | openshift-a6dbc9ff06b6a245317de6279e7b3c88ff0ef1c3.tar.gz openshift-a6dbc9ff06b6a245317de6279e7b3c88ff0ef1c3.tar.bz2 openshift-a6dbc9ff06b6a245317de6279e7b3c88ff0ef1c3.tar.xz openshift-a6dbc9ff06b6a245317de6279e7b3c88ff0ef1c3.zip |
Allow OVS 2.7 in latest OpenShift releases
Change the package_version check to tolerate either Open vSwitch 2.6 or
2.7.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1465882
This commit removes a unit test that adds no coverage and tests data
instead of logic. This coupling makes every change to supported versions
require the same changes to the tests.
Diffstat (limited to 'roles/openshift_health_checker')
-rw-r--r-- | roles/openshift_health_checker/openshift_checks/package_version.py | 4 | ||||
-rw-r--r-- | roles/openshift_health_checker/test/package_version_test.py | 30 |
2 files changed, 2 insertions, 32 deletions
diff --git a/roles/openshift_health_checker/openshift_checks/package_version.py b/roles/openshift_health_checker/openshift_checks/package_version.py index 6a76bb93d..204752bd0 100644 --- a/roles/openshift_health_checker/openshift_checks/package_version.py +++ b/roles/openshift_health_checker/openshift_checks/package_version.py @@ -10,8 +10,8 @@ class PackageVersion(NotContainerizedMixin, OpenShiftCheck): tags = ["preflight"] openshift_to_ovs_version = { - "3.6": "2.6", - "3.5": "2.6", + "3.6": ["2.6", "2.7"], + "3.5": ["2.6", "2.7"], "3.4": "2.4", } diff --git a/roles/openshift_health_checker/test/package_version_test.py b/roles/openshift_health_checker/test/package_version_test.py index 91eace512..1bb6371ae 100644 --- a/roles/openshift_health_checker/test/package_version_test.py +++ b/roles/openshift_health_checker/test/package_version_test.py @@ -72,36 +72,6 @@ def test_package_version(openshift_release): assert result is return_value -@pytest.mark.parametrize('deployment_type,openshift_release,expected_ovs_version', [ - ("openshift-enterprise", "3.5", "2.6"), - ("origin", "3.6", "2.6"), - ("openshift-enterprise", "3.4", "2.4"), - ("origin", "3.3", "2.4"), -]) -def test_ovs_package_version(deployment_type, openshift_release, expected_ovs_version): - task_vars = dict( - openshift=dict(common=dict(service_type='origin')), - openshift_release=openshift_release, - openshift_image_tag='v' + openshift_release, - openshift_deployment_type=deployment_type, - ) - return_value = object() - - def execute_module(module_name=None, module_args=None, tmp=None, task_vars=None): - assert module_name == 'aos_version' - assert "package_list" in module_args - - for pkg in module_args["package_list"]: - if pkg["name"] == "openvswitch": - assert pkg["version"] == expected_ovs_version - - return return_value - - check = PackageVersion(execute_module=execute_module) - result = check.run(tmp=None, task_vars=task_vars) - assert result is return_value - - @pytest.mark.parametrize('deployment_type,openshift_release,expected_docker_version', [ ("origin", "3.5", "1.12"), ("openshift-enterprise", "3.4", "1.12"), |