Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cmd/dependabot/internal/cmd/update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,11 @@ func Test_extractInput(t *testing.T) {
// Retry the calls in case the server takes a bit to start up.
for i := 0; i < 10; i++ {
body := strings.NewReader(`{"job":{"package-manager":"go_modules"}}`)
_, err := http.Post("http://127.0.0.1:8080", "application/json", body)
resp, err := http.Post("http://127.0.0.1:8080", "application/json", body)
if err != nil {
time.Sleep(10 * time.Millisecond)
} else {
resp.Body.Close()
return
}
}
Expand Down
1 change: 1 addition & 0 deletions internal/infra/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ func checkCredAccess(ctx context.Context, job *model.Job, creds []model.Credenti
if err != nil {
return fmt.Errorf("failed making request: %w", err)
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
return fmt.Errorf("failed request to GitHub API to check access: %s", resp.Status)
}
Expand Down