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
27 27
28func TestListRepositoryIssuesPaginatesAndLimits(t *testing.T) {28func TestListRepositoryIssuesPaginatesAndLimits(t *testing.T) {
29 server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {29 server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
30 if r.Header.Get("Authorization") != "Bearer token" {30 if got := r.Header.Get("Authorization"); got != "Bearer token" {
31 t.Fatalf("missing auth header: %q", r.Header.Get("Authorization"))31 t.Fatalf("auth header mismatch: present=%t length=%d", got != "", len(got))
32 }32 }
33 switch r.URL.Query().Get("page") {33 switch r.URL.Query().Get("page") {
34 case "":34 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