← Back to team overview

yellow team mailing list archive

[Merge] lp:~frankban/launchpad/bug-953902-isolation-failure into lp:launchpad

 

Francesco Banconi has proposed merging lp:~frankban/launchpad/bug-953902-isolation-failure into lp:launchpad.

Requested reviews:
  Launchpad Yellow Squad (yellow)
Related bugs:
  Bug #953902 in Launchpad itself: "Isolation failure for TestPPAHtaccessTokenGeneration.testDryrunOption"
  https://bugs.launchpad.net/launchpad/+bug/953902
  Bug #953911 in Launchpad itself: "Isolation failure for TestPPAHtaccessTokenGeneration.testGenerateHtpasswd "
  https://bugs.launchpad.net/launchpad/+bug/953911

For more details, see:
https://code.launchpad.net/~frankban/launchpad/bug-953902-isolation-failure/+merge/97200

== Changes ==

Updated HtaccessTokenGenerator.generateHtpasswd to create the access root directory if it does not exist.
This solves 2 test failures when tests are run in isolation.
-- 
https://code.launchpad.net/~frankban/launchpad/bug-953902-isolation-failure/+merge/97200
Your team Launchpad Yellow Squad is requested to review the proposed merge of lp:~frankban/launchpad/bug-953902-isolation-failure into lp:launchpad.
=== modified file 'lib/lp/archivepublisher/scripts/generate_ppa_htaccess.py'
--- lib/lp/archivepublisher/scripts/generate_ppa_htaccess.py	2012-01-01 02:58:52 +0000
+++ lib/lp/archivepublisher/scripts/generate_ppa_htaccess.py	2012-03-13 12:04:44 +0000
@@ -88,6 +88,8 @@
         """
         # Create a temporary file that will be a new .htpasswd.
         pub_config = getPubConfig(ppa)
+        if not os.path.exists(pub_config.htaccessroot):
+            os.makedirs(pub_config.htaccessroot)
         fd, temp_filename = tempfile.mkstemp(dir=pub_config.htaccessroot)
         os.close(fd)