Skip to content

Commit

Permalink
Don't require client_secret to be present.
Browse files Browse the repository at this point in the history
Only test that secret is not included.

It seems versions of Go 1.6 and older did not include the URL query
parameters.
  • Loading branch information
dmitshur committed Jan 19, 2017
1 parent beac0e8 commit c9c37fd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions github/github_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,7 @@ func TestDo_sanitizeURL(t *testing.T) {
if err == nil {
t.Fatal("Expected error to be returned.")
}
if !strings.Contains(err.Error(), "client_secret=REDACTED") ||
strings.Contains(err.Error(), "client_secret=secret") {
if strings.Contains(err.Error(), "client_secret=secret") {
t.Errorf("Do error contains secret, should be redacted:\n%q", err)
}
}
Expand Down

0 comments on commit c9c37fd

Please sign in to comment.