From: Andrew Schoen Date: Wed, 4 Feb 2015 20:19:08 +0000 (-0600) Subject: Added integration tests to ensure locking is working correctly X-Git-Tag: 1.1.0~1015^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=594a35215119583120c20dd1b6704a6b3baa27dc;p=teuthology.git Added integration tests to ensure locking is working correctly Signed-off-by: Andrew Schoen --- diff --git a/teuthology/task/tests/test_locking.py b/teuthology/task/tests/test_locking.py new file mode 100644 index 0000000000..aa395e71ae --- /dev/null +++ b/teuthology/task/tests/test_locking.py @@ -0,0 +1,27 @@ +import pytest +import re + + +class TestLocking(object): + + def test_correct_os_type(self, ctx, config): + os_type = ctx.config.get("os_type") + if os_type is None: + pytest.skip('os_type was not defined') + for remote in ctx.cluster.remotes.iterkeys(): + assert remote.os.name == os_type + + def test_correct_os_version(self, ctx, config): + os_version = ctx.config.get("os_version") + if os_version is None: + pytest.skip('os_version was not defined') + for remote in ctx.cluster.remotes.iterkeys(): + assert remote.os.version == os_version + + def test_correct_machine_type(self, ctx, config): + machine_type = ctx.machine_type + for remote in ctx.cluster.remotes.iterkeys(): + # gotta be a better way to get machine_type + # if not, should we move this to Remote? + remote_type = re.sub("[0-9]", "", remote.shortname) + assert remote_type in machine_type