From c7c1808ad1b29ec01b19057eaed9e5014cb9ff0d Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Tue, 24 Nov 2015 10:14:35 +0100 Subject: [PATCH] Add unit tests for webroot permissions handling Tested, pass. --- letsencrypt/plugins/webroot_test.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/letsencrypt/plugins/webroot_test.py b/letsencrypt/plugins/webroot_test.py index 897c6993f..3fa7f2994 100644 --- a/letsencrypt/plugins/webroot_test.py +++ b/letsencrypt/plugins/webroot_test.py @@ -74,10 +74,11 @@ class AuthenticatorTest(unittest.TestCase): # Remove exec bit from permission check, so that it # matches the file - parent_permissions = (stat.S_IMODE(os.stat(self.path)) & + responses = self.auth.perform([self.achall]) + parent_permissions = (stat.S_IMODE(os.stat(self.path).st_mode) & ~stat.S_IEXEC) - actual_permissions = stat.S_IMODE(os.stat(self.validation_path)) + actual_permissions = stat.S_IMODE(os.stat(self.validation_path).st_mode) self.assertEqual(parent_permissions, actual_permissions)