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
=== modified file 'lib/lp/archivepublisher/tests/test_generate_ppa_htaccess.py'
--- lib/lp/archivepublisher/tests/test_generate_ppa_htaccess.py 2010-02-19 11:39:41 +0000
+++ lib/lp/archivepublisher/tests/test_generate_ppa_htaccess.py 2010-03-09 07:34:17 +0000
@@ -201,7 +201,7 @@
201 file.close()201 file.close()
202202
203 # Write the same contents in a temp file.203 # Write the same contents in a temp file.
204 fd, temp_filename = tempfile.mkstemp()204 fd, temp_filename = tempfile.mkstemp(dir=pub_config.htaccessroot)
205 file = os.fdopen(fd, "w")205 file = os.fdopen(fd, "w")
206 file.write(FILE_CONTENT)206 file.write(FILE_CONTENT)
207 file.close()207 file.close()
208208
=== modified file 'lib/lp/soyuz/scripts/tests/test_publishdistro.py'
--- lib/lp/soyuz/scripts/tests/test_publishdistro.py 2010-02-27 20:20:03 +0000
+++ lib/lp/soyuz/scripts/tests/test_publishdistro.py 2010-03-09 07:34:17 +0000
@@ -145,10 +145,10 @@
145 self.getPubSource(filecontent="flangetrousers", archive=archive)145 self.getPubSource(filecontent="flangetrousers", archive=archive)
146 self.layer.txn.commit()146 self.layer.txn.commit()
147 pubconf = getPubConfig(archive)147 pubconf = getPubConfig(archive)
148 tmp_path = "/tmp/tmpdistroot"148 tmp_path = os.path.join(pubconf.archiveroot, "tmpdistroot")
149 if os.path.exists(tmp_path):149 if os.path.exists(tmp_path):
150 shutil.rmtree(tmp_path)150 shutil.rmtree(tmp_path)
151 os.mkdir(tmp_path)151 os.makedirs(tmp_path)
152 myargs = ['-R', tmp_path]152 myargs = ['-R', tmp_path]
153 if archive.purpose == ArchivePurpose.PARTNER:153 if archive.purpose == ArchivePurpose.PARTNER:
154 myargs.append('--partner')154 myargs.append('--partner')

Subscribers

People subscribed via source and target branches

to status/vote changes: