Merge ~paelzer/qa-regression-testing:fix-ntp-artful into qa-regression-testing:master

Proposed by Christian Ehrhardt 
Status: Merged
Merged at revision: afc75f928467f35ca667c63b7471cbb4d7edef00
Proposed branch: ~paelzer/qa-regression-testing:fix-ntp-artful
Merge into: qa-regression-testing:master
Diff against target: 23 lines (+3/-2)
1 file modified
scripts/test-ntp.py (+3/-2)
Reviewer Review Type Date Requested Status
Tyler Hicks (community) Approve
Review via email: mp+326154@code.launchpad.net

Description of the change

While preparing a re-merge in Artful I found that there were some changes triggered by the latest changes in Debian that are ok, but let one of the testcases break.
This branch fixes test-ntp.py to work again (changes are backwards compatible)

To post a comment you must log in.
Revision history for this message
Tyler Hicks (tyhicks) wrote :

I don't love using /var as the mkdtemp() dir but understand the need.

review: Approve
Revision history for this message
Tyler Hicks (tyhicks) wrote :

I've merged this branch. Thanks for these fixes! :)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/scripts/test-ntp.py b/scripts/test-ntp.py
2index e820481..c69648c 100755
3--- a/scripts/test-ntp.py
4+++ b/scripts/test-ntp.py
5@@ -103,7 +103,7 @@ class NtpTest(testlib.TestlibCase, PrivateNtpTest):
6
7 def _setup_keys(self):
8 '''Setup public keys'''
9- self.tmpdir = tempfile.mkdtemp(prefix='testlib', dir='/tmp')
10+ self.tmpdir = tempfile.mkdtemp(prefix='testlib', dir='/var')
11
12 rnd = os.path.join(self.tmpdir, '.rnd')
13 os.environ.setdefault('RANDFILE', '')
14@@ -198,8 +198,9 @@ keysdir %s
15
16 found_cert = False
17 pat = re.compile(r'^cert=')
18+ pat2 = re.compile(r', cert=')
19 for line in report.splitlines():
20- if pat.search(line):
21+ if pat.search(line) or pat2.search(line):
22 found_cert = True
23 break
24

Subscribers

People subscribed via source and target branches