{"action":"created","comment":{"url":"https://api.github.com/repos/letsencrypt/boulder/pulls/comments/35020814","id":35020814,"diff_hunk":"@@ -213,12 +218,19 @@ func TestSimpleHttpTLS(t *testing.T) {\n \tfinChall, err := va.validateSimpleHTTP(ident, chall)\n \ttest.AssertEquals(t, finChall.Status, core.StatusValid)\n \ttest.AssertNotError(t, err, chall.Path)\n+\tlogs := log.GetAllMatching(`^\\[AUDIT\\] Attempting to validate SimpleHTTPS for `)\n+\ttest.AssertEquals(t, len(logs), 1)\n+\ttest.AssertEquals(t, logs[0].Priority, syslog.LOG_NOTICE)\n }\n \n func TestSimpleHttp(t *testing.T) {\n \tva := NewValidationAuthorityImpl(true)\n \tva.DNSResolver = &mocks.MockDNS{}\n \n+\tlog := mocks.NewSyslogWriter()\n+\tdefer log.Close()\n+\tdefer mocks.SwitchLog(mocks.SwitchLog(log))\n+","path":"va/validation-authority_test.go","position":35,"original_position":35,"commit_id":"249664383dcfd86e727040d8a5276ca480d06186","original_commit_id":"249664383dcfd86e727040d8a5276ca480d06186","user":{"login":"jsha","id":220205,"avatar_url":"https://avatars.githubusercontent.com/u/220205?v=3","gravatar_id":"","url":"https://api.github.com/users/jsha","html_url":"https://github.com/jsha","followers_url":"https://api.github.com/users/jsha/followers","following_url":"https://api.github.com/users/jsha/following{/other_user}","gists_url":"https://api.github.com/users/jsha/gists{/gist_id}","starred_url":"https://api.github.com/users/jsha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsha/subscriptions","organizations_url":"https://api.github.com/users/jsha/orgs","repos_url":"https://api.github.com/users/jsha/repos","events_url":"https://api.github.com/users/jsha/events{/privacy}","received_events_url":"https://api.github.com/users/jsha/received_events","type":"User","site_admin":false},"body":"The goal here is to restore the default singleton SyslogWriter after a test? I think, as you say, it's easier to assume that the state of the singleton SyslogWriter is undefined at the beginning of any test, and make sure to override it with UseMockLog for any test that relies on checking log output.","created_at":"2015-07-20T17:32:44Z","updated_at":"2015-07-20T17:32:44Z","html_url":"https://github.com/letsencrypt/boulder/pull/498#discussion_r35020814","pull_request_url":"https://api.github.com/repos/letsencrypt/boulder/pulls/498","_links":{"self":{"href":"https://api.github.com/repos/letsencrypt/boulder/pulls/comments/35020814"},"html":{"href":"https://github.com/letsencrypt/boulder/pull/498#discussion_r35020814"},"pull_request":{"href":"https://api.github.com/repos/letsencrypt/boulder/pulls/498"}}},"pull_request":{"url":"https://api.github.com/repos/letsencrypt/boulder/pulls/498","id":40306023,"html_url":"https://github.com/letsencrypt/boulder/pull/498","diff_url":"https://github.com/letsencrypt/boulder/pull/498.diff","patch_url":"https://github.com/letsencrypt/boulder/pull/498.patch","issue_url":"https://api.github.com/repos/letsencrypt/boulder/issues/498","number":498,"state":"open","locked":false,"title":"Add mock for syslog.","user":{"login":"tomclegg","id":100187,"avatar_url":"https://avatars.githubusercontent.com/u/100187?v=3","gravatar_id":"","url":"https://api.github.com/users/tomclegg","html_url":"https://github.com/tomclegg","followers_url":"https://api.github.com/users/tomclegg/followers","following_url":"https://api.github.com/users/tomclegg/following{/other_user}","gists_url":"https://api.github.com/users/tomclegg/gists{/gist_id}","starred_url":"https://api.github.com/users/tomclegg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomclegg/subscriptions","organizations_url":"https://api.github.com/users/tomclegg/orgs","repos_url":"https://api.github.com/users/tomclegg/repos","events_url":"https://api.github.com/users/tomclegg/events{/privacy}","received_events_url":"https://api.github.com/users/tomclegg/received_events","type":"User","site_admin":false},"body":"See #490. Just a couple of example uses shown so far. Does this look like a good approach?","created_at":"2015-07-19T10:00:11Z","updated_at":"2015-07-20T17:32:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c8c97334283fda9083e63bffc211a62c5510283","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/letsencrypt/boulder/pulls/498/commits","review_comments_url":"https://api.github.com/repos/letsencrypt/boulder/pulls/498/comments","review_comment_url":"https://api.github.com/repos/letsencrypt/boulder/pulls/comments{/number}","comments_url":"https://api.github.com/repos/letsencrypt/boulder/issues/498/comments","statuses_url":"https://api.github.com/repos/letsencrypt/boulder/statuses/249664383dcfd86e727040d8a5276ca480d06186","head":{"label":"tomclegg:490-mock-logs","ref":"490-mock-logs","sha":"249664383dcfd86e727040d8a5276ca480d06186","user":{"login":"tomclegg","id":100187,"avatar_url":"https://avatars.githubusercontent.com/u/100187?v=3","gravatar_id":"","url":"https://api.github.com/users/tomclegg","html_url":"https://github.com/tomclegg","followers_url":"https://api.github.com/users/tomclegg/followers","following_url":"https://api.github.com/users/tomclegg/following{/other_user}","gists_url":"https://api.github.com/users/tomclegg/gists{/gist_id}","starred_url":"https://api.github.com/users/tomclegg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomclegg/subscriptions","organizations_url":"https://api.github.com/users/tomclegg/orgs","repos_url":"https://api.github.com/users/tomclegg/repos","events_url":"https://api.github.com/users/tomclegg/events{/privacy}","received_events_url":"https://api.github.com/users/tomclegg/received_events","type":"User","site_admin":false},"repo":{"id":39055461,"name":"boulder","full_name":"tomclegg/boulder","owner":{"login":"tomclegg","id":100187,"avatar_url":"https://avatars.githubusercontent.com/u/100187?v=3","gravatar_id":"","url":"https://api.github.com/users/tomclegg","html_url":"https://github.com/tomclegg","followers_url":"https://api.github.com/users/tomclegg/followers","following_url":"https://api.github.com/users/tomclegg/following{/other_user}","gists_url":"https://api.github.com/users/tomclegg/gists{/gist_id}","starred_url":"https://api.github.com/users/tomclegg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomclegg/subscriptions","organizations_url":"https://api.github.com/users/tomclegg/orgs","repos_url":"https://api.github.com/users/tomclegg/repos","events_url":"https://api.github.com/users/tomclegg/events{/privacy}","received_events_url":"https://api.github.com/users/tomclegg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tomclegg/boulder","description":"An ACME-based CA, written in Go.","fork":true,"url":"https://api.github.com/repos/tomclegg/boulder","forks_url":"https://api.github.com/repos/tomclegg/boulder/forks","keys_url":"https://api.github.com/repos/tomclegg/boulder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tomclegg/boulder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tomclegg/boulder/teams","hooks_url":"https://api.github.com/repos/tomclegg/boulder/hooks","issue_events_url":"https://api.github.com/repos/tomclegg/boulder/issues/events{/number}","events_url":"https://api.github.com/repos/tomclegg/boulder/events","assignees_url":"https://api.github.com/repos/tomclegg/boulder/assignees{/user}","branches_url":"https://api.github.com/repos/tomclegg/boulder/branches{/branch}","tags_url":"https://api.github.com/repos/tomclegg/boulder/tags","blobs_url":"https://api.github.com/repos/tomclegg/boulder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tomclegg/boulder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tomclegg/boulder/git/refs{/sha}","trees_url":"https://api.github.com/repos/tomclegg/boulder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tomclegg/boulder/statuses/{sha}","languages_url":"https://api.github.com/repos/tomclegg/boulder/languages","stargazers_url":"https://api.github.com/repos/tomclegg/boulder/stargazers","contributors_url":"https://api.github.com/repos/tomclegg/boulder/contributors","subscribers_url":"https://api.github.com/repos/tomclegg/boulder/subscribers","subscription_url":"https://api.github.com/repos/tomclegg/boulder/subscription","commits_url":"https://api.github.com/repos/tomclegg/boulder/commits{/sha}","git_commits_url":"https://api.github.com/repos/tomclegg/boulder/git/commits{/sha}","comments_url":"https://api.github.com/repos/tomclegg/boulder/comments{/number}","issue_comment_url":"https://api.github.com/repos/tomclegg/boulder/issues/comments{/number}","contents_url":"https://api.github.com/repos/tomclegg/boulder/contents/{+path}","compare_url":"https://api.github.com/repos/tomclegg/boulder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tomclegg/boulder/merges","archive_url":"https://api.github.com/repos/tomclegg/boulder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tomclegg/boulder/downloads","issues_url":"https://api.github.com/repos/tomclegg/boulder/issues{/number}","pulls_url":"https://api.github.com/repos/tomclegg/boulder/pulls{/number}","milestones_url":"https://api.github.com/repos/tomclegg/boulder/milestones{/number}","notifications_url":"https://api.github.com/repos/tomclegg/boulder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tomclegg/boulder/labels{/name}","releases_url":"https://api.github.com/repos/tomclegg/boulder/releases{/id}","created_at":"2015-07-14T05:26:19Z","updated_at":"2015-07-14T05:26:20Z","pushed_at":"2015-07-19T18:22:56Z","git_url":"git://github.com/tomclegg/boulder.git","ssh_url":"git@github.com:tomclegg/boulder.git","clone_url":"https://github.com/tomclegg/boulder.git","svn_url":"https://github.com/tomclegg/boulder","homepage":null,"size":11882,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"letsencrypt:master","ref":"master","sha":"8549ecae81e68028b7a129b691fe9f594e78c522","user":{"login":"letsencrypt","id":9289019,"avatar_url":"https://avatars.githubusercontent.com/u/9289019?v=3","gravatar_id":"","url":"https://api.github.com/users/letsencrypt","html_url":"https://github.com/letsencrypt","followers_url":"https://api.github.com/users/letsencrypt/followers","following_url":"https://api.github.com/users/letsencrypt/following{/other_user}","gists_url":"https://api.github.com/users/letsencrypt/gists{/gist_id}","starred_url":"https://api.github.com/users/letsencrypt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/letsencrypt/subscriptions","organizations_url":"https://api.github.com/users/letsencrypt/orgs","repos_url":"https://api.github.com/users/letsencrypt/repos","events_url":"https://api.github.com/users/letsencrypt/events{/privacy}","received_events_url":"https://api.github.com/users/letsencrypt/received_events","type":"Organization","site_admin":false},"repo":{"id":28283593,"name":"boulder","full_name":"letsencrypt/boulder","owner":{"login":"letsencrypt","id":9289019,"avatar_url":"https://avatars.githubusercontent.com/u/9289019?v=3","gravatar_id":"","url":"https://api.github.com/users/letsencrypt","html_url":"https://github.com/letsencrypt","followers_url":"https://api.github.com/users/letsencrypt/followers","following_url":"https://api.github.com/users/letsencrypt/following{/other_user}","gists_url":"https://api.github.com/users/letsencrypt/gists{/gist_id}","starred_url":"https://api.github.com/users/letsencrypt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/letsencrypt/subscriptions","organizations_url":"https://api.github.com/users/letsencrypt/orgs","repos_url":"https://api.github.com/users/letsencrypt/repos","events_url":"https://api.github.com/users/letsencrypt/events{/privacy}","received_events_url":"https://api.github.com/users/letsencrypt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/letsencrypt/boulder","description":"An ACME-based CA, written in Go.","fork":false,"url":"https://api.github.com/repos/letsencrypt/boulder","forks_url":"https://api.github.com/repos/letsencrypt/boulder/forks","keys_url":"https://api.github.com/repos/letsencrypt/boulder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/letsencrypt/boulder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/letsencrypt/boulder/teams","hooks_url":"https://api.github.com/repos/letsencrypt/boulder/hooks","issue_events_url":"https://api.github.com/repos/letsencrypt/boulder/issues/events{/number}","events_url":"https://api.github.com/repos/letsencrypt/boulder/events","assignees_url":"https://api.github.com/repos/letsencrypt/boulder/assignees{/user}","branches_url":"https://api.github.com/repos/letsencrypt/boulder/branches{/branch}","tags_url":"https://api.github.com/repos/letsencrypt/boulder/tags","blobs_url":"https://api.github.com/repos/letsencrypt/boulder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/letsencrypt/boulder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/letsencrypt/boulder/git/refs{/sha}","trees_url":"https://api.github.com/repos/letsencrypt/boulder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/letsencrypt/boulder/statuses/{sha}","languages_url":"https://api.github.com/repos/letsencrypt/boulder/languages","stargazers_url":"https://api.github.com/repos/letsencrypt/boulder/stargazers","contributors_url":"https://api.github.com/repos/letsencrypt/boulder/contributors","subscribers_url":"https://api.github.com/repos/letsencrypt/boulder/subscribers","subscription_url":"https://api.github.com/repos/letsencrypt/boulder/subscription","commits_url":"https://api.github.com/repos/letsencrypt/boulder/commits{/sha}","git_commits_url":"https://api.github.com/repos/letsencrypt/boulder/git/commits{/sha}","comments_url":"https://api.github.com/repos/letsencrypt/boulder/comments{/number}","issue_comment_url":"https://api.github.com/repos/letsencrypt/boulder/issues/comments{/number}","contents_url":"https://api.github.com/repos/letsencrypt/boulder/contents/{+path}","compare_url":"https://api.github.com/repos/letsencrypt/boulder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/letsencrypt/boulder/merges","archive_url":"https://api.github.com/repos/letsencrypt/boulder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/letsencrypt/boulder/downloads","issues_url":"https://api.github.com/repos/letsencrypt/boulder/issues{/number}","pulls_url":"https://api.github.com/repos/letsencrypt/boulder/pulls{/number}","milestones_url":"https://api.github.com/repos/letsencrypt/boulder/milestones{/number}","notifications_url":"https://api.github.com/repos/letsencrypt/boulder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/letsencrypt/boulder/labels{/name}","releases_url":"https://api.github.com/repos/letsencrypt/boulder/releases{/id}","created_at":"2014-12-21T00:29:54Z","updated_at":"2015-07-20T12:42:58Z","pushed_at":"2015-07-19T18:22:57Z","git_url":"git://github.com/letsencrypt/boulder.git","ssh_url":"git@github.com:letsencrypt/boulder.git","clone_url":"https://github.com/letsencrypt/boulder.git","svn_url":"https://github.com/letsencrypt/boulder","homepage":null,"size":14874,"stargazers_count":578,"watchers_count":578,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":45,"mirror_url":null,"open_issues_count":91,"forks":45,"open_issues":91,"watchers":578,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/letsencrypt/boulder/pulls/498"},"html":{"href":"https://github.com/letsencrypt/boulder/pull/498"},"issue":{"href":"https://api.github.com/repos/letsencrypt/boulder/issues/498"},"comments":{"href":"https://api.github.com/repos/letsencrypt/boulder/issues/498/comments"},"review_comments":{"href":"https://api.github.com/repos/letsencrypt/boulder/pulls/498/comments"},"review_comment":{"href":"https://api.github.com/repos/letsencrypt/boulder/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/letsencrypt/boulder/pulls/498/commits"},"statuses":{"href":"https://api.github.com/repos/letsencrypt/boulder/statuses/249664383dcfd86e727040d8a5276ca480d06186"}}}}