summaryrefslogtreecommitdiffstats
path: root/roles/openshift_health_checker/test/disk_availability_test.py
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2017-10-27 16:45:31 -0700
committerGitHub <noreply@github.com>2017-10-27 16:45:31 -0700
commitbc00510f20bc516a0fcc738981ac60fd9c01ad5d (patch)
tree80212eeaae266c35955d90ede3577e94c8c11798 /roles/openshift_health_checker/test/disk_availability_test.py
parent2c81304511afcf03b35583f85040fb7d0b83cad5 (diff)
parent4fb35642a47550021fed3e455bedc9b6fdf2b9c9 (diff)
downloadopenshift-bc00510f20bc516a0fcc738981ac60fd9c01ad5d.tar.gz
openshift-bc00510f20bc516a0fcc738981ac60fd9c01ad5d.tar.bz2
openshift-bc00510f20bc516a0fcc738981ac60fd9c01ad5d.tar.xz
openshift-bc00510f20bc516a0fcc738981ac60fd9c01ad5d.zip
Merge pull request #5816 from sosiouxme/20171019-disk-check-sum-var
Automatic merge from submit-queue. disk_availability check: include submount storage Fixes bug [1491566](https://bugzilla.redhat.com/show_bug.cgi?id=1491566) In order to determine how much storage is under a path, include any mounts that are below it in addition to the path itself.
Diffstat (limited to 'roles/openshift_health_checker/test/disk_availability_test.py')
-rw-r--r--roles/openshift_health_checker/test/disk_availability_test.py23
1 files changed, 21 insertions, 2 deletions
diff --git a/roles/openshift_health_checker/test/disk_availability_test.py b/roles/openshift_health_checker/test/disk_availability_test.py
index 29a325a17..7acdb40ec 100644
--- a/roles/openshift_health_checker/test/disk_availability_test.py
+++ b/roles/openshift_health_checker/test/disk_availability_test.py
@@ -96,6 +96,24 @@ def test_cannot_determine_available_disk(desc, ansible_mounts, expect_chunks):
'size_available': 20 * 10**9 + 1,
}],
),
+ (
+ ['oo_masters_to_config'],
+ 0,
+ [{
+ 'mount': '/',
+ 'size_available': 2 * 10**9,
+ }, { # not enough directly on /var
+ 'mount': '/var',
+ 'size_available': 10 * 10**9 + 1,
+ }, {
+ # but subdir mounts add up to enough
+ 'mount': '/var/lib/docker',
+ 'size_available': 20 * 10**9 + 1,
+ }, {
+ 'mount': '/var/lib/origin',
+ 'size_available': 20 * 10**9 + 1,
+ }],
+ ),
])
def test_succeeds_with_recommended_disk_space(group_names, configured_min, ansible_mounts):
task_vars = dict(
@@ -104,9 +122,10 @@ def test_succeeds_with_recommended_disk_space(group_names, configured_min, ansib
ansible_mounts=ansible_mounts,
)
- result = DiskAvailability(fake_execute_module, task_vars).run()
+ check = DiskAvailability(fake_execute_module, task_vars)
+ check.run()
- assert not result.get('failed', False)
+ assert not check.failures
@pytest.mark.parametrize('name,group_names,configured_min,ansible_mounts,expect_chunks', [