From 6d7381f58262344a238c238f83e9873c5c3f40be Mon Sep 17 00:00:00 2001 From: Tom Prince Date: Mon, 30 Jun 2014 12:09:08 -0600 Subject: [PATCH 1/3] Address more review comments. --- flocker/testtools.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flocker/testtools.py b/flocker/testtools.py index 338333f544..e1f2001548 100644 --- a/flocker/testtools.py +++ b/flocker/testtools.py @@ -357,7 +357,7 @@ def find_free_port(interface='127.0.0.1', socket_family=socket.AF_INET, def skip_on_broken_permissions(test_method): """ Skips the wrapped test when the temporary directory is on a - virtualbox shared folder. + filesystem with broken permissions. Virtualbox's shared folder (as used for :file:`/vagrant`) doesn't entirely respect changing permissions. For example, this test detects running on a @@ -366,6 +366,8 @@ def skip_on_broken_permissions(test_method): :param callable test_method: Test method to wrap. :return: The wrapped method. + :raise SkipTest: when the temporary directory is on a filesystem with + broken permissions. """ @wraps(test_method) def wrapper(case, *args, **kwargs): From 71cfb3c893b76a7f33f044211fab56d56310b5c2 Mon Sep 17 00:00:00 2001 From: Tom Prince Date: Tue, 1 Jul 2014 14:51:48 -0600 Subject: [PATCH 2/3] Fix skip message. --- flocker/testtools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flocker/testtools.py b/flocker/testtools.py index e1f2001548..4ca6e20969 100644 --- a/flocker/testtools.py +++ b/flocker/testtools.py @@ -377,6 +377,6 @@ def wrapper(case, *args, **kwargs): permissions = test_file.getPermissions() test_file.chmod(0o777) if permissions != Permissions(0o000): - raise SkipTest("Can't run test on virtualbox shared folder.") + raise SkipTest("Can't run test on filesystem with broken permissions.") return test_method(case, *args, **kwargs) return wrapper From 909e7a7b6cb9e7499d1e566315e5ff1cf4ce5e0e Mon Sep 17 00:00:00 2001 From: Tom Prince Date: Tue, 1 Jul 2014 15:20:07 -0600 Subject: [PATCH 3/3] lint --- flocker/testtools.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flocker/testtools.py b/flocker/testtools.py index 4ca6e20969..1701fc1d6a 100644 --- a/flocker/testtools.py +++ b/flocker/testtools.py @@ -377,6 +377,7 @@ def wrapper(case, *args, **kwargs): permissions = test_file.getPermissions() test_file.chmod(0o777) if permissions != Permissions(0o000): - raise SkipTest("Can't run test on filesystem with broken permissions.") + raise SkipTest( + "Can't run test on filesystem with broken permissions.") return test_method(case, *args, **kwargs) return wrapper