History

test: make token fallback hermetic (#141)

Peter Steinberger committed 3 months ago

Commit befe0fc1 parent 16f71e911 files · +85 −64Browse files

Showing the changes to internal/github (1 of 11 files). Show all

Unified · Split

internal/github/client_test.go+2−2
@@ -27,8 +27,8 @@ func writeRateLimits(t *testing.T, w http.ResponseWriter, resetAt time.Time, cor · 26 unmodified lines
2727
2828 func TestListRepositoryIssuesPaginatesAndLimits(t *testing.T) {
2929 server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
30− if r.Header.Get("Authorization") != "Bearer token" {
31− t.Fatalf("missing auth header: %q", r.Header.Get("Authorization"))
30+ if got := r.Header.Get("Authorization"); got != "Bearer token" {
31+ t.Fatalf("auth header mismatch: present=%t length=%d", got != "", len(got))
3232 }
3333 switch r.URL.Query().Get("page") {
3434 case "":

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t