Merge lp:~chipaca/ubuntu-push/fixed-borked-pem-checks into lp:ubuntu-push

Proposed by John Lenton
Status: Merged
Merged at revision: 62
Proposed branch: lp:~chipaca/ubuntu-push/fixed-borked-pem-checks
Merge into: lp:ubuntu-push
Diff against target: 33 lines (+4/-2)
1 file modified
client/client_test.go (+4/-2)
To merge this branch: bzr merge lp:~chipaca/ubuntu-push/fixed-borked-pem-checks
Reviewer Review Type Date Requested Status
Samuele Pedroni Approve
Review via email: mp+205481@code.launchpad.net

Commit message

oops, i borked the pem check tests. Fixed.

Description of the change

I broke the tests that checked configure against broken PEMs... fixed
them (and made them more resilient).

To post a comment you must log in.
Revision history for this message
Samuele Pedroni (pedronis) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'client/client_test.go'
2--- client/client_test.go 2014-02-06 13:11:32 +0000
3+++ client/client_test.go 2014-02-08 18:23:21 +0000
4@@ -175,12 +175,13 @@
5 "connectivity_check_md5": "",
6 "addr": ":0",
7 "cert_pem_file": "/a/b/c",
8+ "log_level": "debug",
9 "recheck_timeout": "3h"
10 }`), 0600)
11
12 cli := new(Client)
13 err := cli.configure(cs.configPath)
14- c.Assert(err, NotNil)
15+ c.Assert(err, ErrorMatches, "reading PEM file: .*")
16 }
17
18 func (cs *clientSuite) TestConfigureBailsOnBadPEM(c *C) {
19@@ -192,12 +193,13 @@
20 "connectivity_check_md5": "",
21 "addr": ":0",
22 "cert_pem_file": "/etc/passwd",
23+ "log_level": "debug",
24 "recheck_timeout": "3h"
25 }`), 0600)
26
27 cli := new(Client)
28 err := cli.configure(cs.configPath)
29- c.Assert(err, NotNil)
30+ c.Assert(err, ErrorMatches, "no PEM found.*")
31 }
32
33 /*****************************************************************

Subscribers

People subscribed via source and target branches