diff options
author | Luke Meyer <lmeyer@redhat.com> | 2017-06-01 19:24:31 -0400 |
---|---|---|
committer | Luke Meyer <lmeyer@redhat.com> | 2017-06-07 19:27:31 -0400 |
commit | a092dff53070c4eaa942dae36fc8742a7d53959d (patch) | |
tree | 332bd39ce6938982317c7054c48e239e242f71e5 /roles/openshift_health_checker/test/docker_image_availability_test.py | |
parent | 055082c1679cb253758bc16e0a6ca37f70d0bc65 (diff) | |
download | openshift-a092dff53070c4eaa942dae36fc8742a7d53959d.tar.gz openshift-a092dff53070c4eaa942dae36fc8742a7d53959d.tar.bz2 openshift-a092dff53070c4eaa942dae36fc8742a7d53959d.tar.xz openshift-a092dff53070c4eaa942dae36fc8742a7d53959d.zip |
docker checks: finish and refactor
Incorporated docker_storage_driver into docker_storage as both need
driver info.
Corrected storage calculation to include VG free space, not just the
current amount in the LV pool. Now makes no assumptions about pool name.
Improved user messaging.
Factored out some methods that can be shared with docker_image_availability.
Diffstat (limited to 'roles/openshift_health_checker/test/docker_image_availability_test.py')
-rw-r--r-- | roles/openshift_health_checker/test/docker_image_availability_test.py | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/roles/openshift_health_checker/test/docker_image_availability_test.py b/roles/openshift_health_checker/test/docker_image_availability_test.py index 0379cafb5..197c65f51 100644 --- a/roles/openshift_health_checker/test/docker_image_availability_test.py +++ b/roles/openshift_health_checker/test/docker_image_availability_test.py @@ -3,19 +3,25 @@ import pytest from openshift_checks.docker_image_availability import DockerImageAvailability -@pytest.mark.parametrize('deployment_type,is_active', [ - ("origin", True), - ("openshift-enterprise", True), - ("enterprise", False), - ("online", False), - ("invalid", False), - ("", False), +@pytest.mark.parametrize('deployment_type, is_containerized, group_names, expect_active', [ + ("origin", True, [], True), + ("openshift-enterprise", True, [], True), + ("enterprise", True, [], False), + ("online", True, [], False), + ("invalid", True, [], False), + ("", True, [], False), + ("origin", False, [], False), + ("openshift-enterprise", False, [], False), + ("origin", False, ["nodes", "masters"], True), + ("openshift-enterprise", False, ["etcd"], False), ]) -def test_is_active(deployment_type, is_active): +def test_is_active(deployment_type, is_containerized, group_names, expect_active): task_vars = dict( + openshift=dict(common=dict(is_containerized=is_containerized)), openshift_deployment_type=deployment_type, + group_names=group_names, ) - assert DockerImageAvailability.is_active(task_vars=task_vars) == is_active + assert DockerImageAvailability.is_active(task_vars=task_vars) == expect_active @pytest.mark.parametrize("is_containerized,is_atomic", [ |