Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix imports
  • Loading branch information
kylecarbs committed Jun 28, 2023
commit 189d7fc2a0e0d2be965e9fb50524e204beb58a1c
7 changes: 0 additions & 7 deletions coderd/gitauth/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,6 @@ func TestConvertYAML(t *testing.T) {
Type: string(codersdk.GitProviderGitHub),
}},
Error: "client_id must be provided",
}, {
Name: "NoClientSecret",
Input: []codersdk.GitAuthConfig{{
Type: string(codersdk.GitProviderGitHub),
ClientID: "example",
}},
Error: "client_secret must be provided",
}, {
Name: "DuplicateType",
Input: []codersdk.GitAuthConfig{{
Expand Down
16 changes: 10 additions & 6 deletions coderd/gitauth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,16 @@ func TestGitAuthByID(t *testing.T) {
AvatarURL: github.String("https://avatars.githubusercontent.com/u/12345678?v=4"),
})
case "/installs":
httpapi.Write(r.Context(), w, http.StatusOK, []github.Installation{{
ID: github.Int64(12345678),
Account: &github.User{
Login: github.String("coder"),
},
}})
httpapi.Write(r.Context(), w, http.StatusOK, struct {
Installations []github.Installation `json:"installations"`
}{
Installations: []github.Installation{{
ID: github.Int64(12345678),
Account: &github.User{
Login: github.String("coder"),
},
}},
})
}
}))
defer srv.Close()
Expand Down