diff options
author | OpenShift Bot <eparis+openshiftbot@redhat.com> | 2017-06-30 13:16:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-30 13:16:15 -0400 |
commit | 3eb468f8d05dcc044c10f3822ee226df3a5506b2 (patch) | |
tree | 4809b2d744ece17e649b4317c1c84f250ed707fc /roles/openshift_health_checker/test/disk_availability_test.py | |
parent | e5afeee8e1cfd6b344aac84d95bdf8b66e775bdd (diff) | |
parent | ffeac220ea2764c02a4ebd9b5e006e82886150bd (diff) | |
download | openshift-3eb468f8d05dcc044c10f3822ee226df3a5506b2.tar.gz openshift-3eb468f8d05dcc044c10f3822ee226df3a5506b2.tar.bz2 openshift-3eb468f8d05dcc044c10f3822ee226df3a5506b2.tar.xz openshift-3eb468f8d05dcc044c10f3822ee226df3a5506b2.zip |
Merge pull request #4436 from rhcarvalho/verify-disk-multipath
Merged by openshift-bot
Diffstat (limited to 'roles/openshift_health_checker/test/disk_availability_test.py')
-rw-r--r-- | roles/openshift_health_checker/test/disk_availability_test.py | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/roles/openshift_health_checker/test/disk_availability_test.py b/roles/openshift_health_checker/test/disk_availability_test.py index b353fa610..945b9eafc 100644 --- a/roles/openshift_health_checker/test/disk_availability_test.py +++ b/roles/openshift_health_checker/test/disk_availability_test.py @@ -3,22 +3,19 @@ import pytest from openshift_checks.disk_availability import DiskAvailability, OpenShiftCheckException -@pytest.mark.parametrize('group_names,is_containerized,is_active', [ - (['masters'], False, True), - # ensure check is skipped on containerized installs - (['masters'], True, False), - (['nodes'], False, True), - (['etcd'], False, True), - (['masters', 'nodes'], False, True), - (['masters', 'etcd'], False, True), - ([], False, False), - (['lb'], False, False), - (['nfs'], False, False), +@pytest.mark.parametrize('group_names,is_active', [ + (['masters'], True), + (['nodes'], True), + (['etcd'], True), + (['masters', 'nodes'], True), + (['masters', 'etcd'], True), + ([], False), + (['lb'], False), + (['nfs'], False), ]) -def test_is_active(group_names, is_containerized, is_active): +def test_is_active(group_names, is_active): task_vars = dict( group_names=group_names, - openshift=dict(common=dict(is_containerized=is_containerized)), ) assert DiskAvailability.is_active(task_vars=task_vars) == is_active @@ -38,7 +35,7 @@ def test_cannot_determine_available_disk(ansible_mounts, extra_words): with pytest.raises(OpenShiftCheckException) as excinfo: check.run(tmp=None, task_vars=task_vars) - for word in 'determine available disk'.split() + extra_words: + for word in 'determine disk availability'.split() + extra_words: assert word in str(excinfo.value) @@ -81,7 +78,7 @@ def test_cannot_determine_available_disk(ansible_mounts, extra_words): [{ # not enough space on / ... 'mount': '/', - 'size_available': 0, + 'size_available': 2 * 10**9, }, { # ... but enough on /var 'mount': '/var', |