Merge lp:~stevenk/launchpad/fix-invalid-crosslink into lp:launchpad/db-devel

Proposed by Steve Kowalik
Status: Merged
Approved by: Michael Nelson
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~stevenk/launchpad/fix-invalid-crosslink
Merge into: lp:launchpad/db-devel
Diff against target: 29 lines (+3/-3)
2 files modified
lib/lp/archivepublisher/tests/test_generate_ppa_htaccess.py (+1/-1)
lib/lp/soyuz/scripts/tests/test_publishdistro.py (+2/-2)
To merge this branch: bzr merge lp:~stevenk/launchpad/fix-invalid-crosslink
Reviewer Review Type Date Requested Status
Michael Nelson (community) Approve
Review via email: mp+20945@code.launchpad.net

Commit message

Change testReplaceUpdatedHtpasswd, testDistsrootOverridePartnerArchive to use the same base device to avoid failures when /tmp and /var are on seperate devices.

Description of the change

This fixes two tests that make the invalid assumption that /tmp and /var are on the same device, and so the tests fail with an error.

To post a comment you must log in.
Revision history for this message
Michael Nelson (michael.nelson) wrote :

Thanks for the cleanup Steve.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/archivepublisher/tests/test_generate_ppa_htaccess.py'
2--- lib/lp/archivepublisher/tests/test_generate_ppa_htaccess.py 2010-02-19 11:39:41 +0000
3+++ lib/lp/archivepublisher/tests/test_generate_ppa_htaccess.py 2010-03-09 07:34:17 +0000
4@@ -201,7 +201,7 @@
5 file.close()
6
7 # Write the same contents in a temp file.
8- fd, temp_filename = tempfile.mkstemp()
9+ fd, temp_filename = tempfile.mkstemp(dir=pub_config.htaccessroot)
10 file = os.fdopen(fd, "w")
11 file.write(FILE_CONTENT)
12 file.close()
13
14=== modified file 'lib/lp/soyuz/scripts/tests/test_publishdistro.py'
15--- lib/lp/soyuz/scripts/tests/test_publishdistro.py 2010-02-27 20:20:03 +0000
16+++ lib/lp/soyuz/scripts/tests/test_publishdistro.py 2010-03-09 07:34:17 +0000
17@@ -145,10 +145,10 @@
18 self.getPubSource(filecontent="flangetrousers", archive=archive)
19 self.layer.txn.commit()
20 pubconf = getPubConfig(archive)
21- tmp_path = "/tmp/tmpdistroot"
22+ tmp_path = os.path.join(pubconf.archiveroot, "tmpdistroot")
23 if os.path.exists(tmp_path):
24 shutil.rmtree(tmp_path)
25- os.mkdir(tmp_path)
26+ os.makedirs(tmp_path)
27 myargs = ['-R', tmp_path]
28 if archive.purpose == ArchivePurpose.PARTNER:
29 myargs.append('--partner')

Subscribers

People subscribed via source and target branches

to status/vote changes: