Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 189d7fc

Browse files
committed
Fix imports
1 parent d7cecd3 commit 189d7fc

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

coderd/gitauth/config_test.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,6 @@ func TestConvertYAML(t *testing.T) {
143143
Type: string(codersdk.GitProviderGitHub),
144144
}},
145145
Error: "client_id must be provided",
146-
}, {
147-
Name: "NoClientSecret",
148-
Input: []codersdk.GitAuthConfig{{
149-
Type: string(codersdk.GitProviderGitHub),
150-
ClientID: "example",
151-
}},
152-
Error: "client_secret must be provided",
153146
}, {
154147
Name: "DuplicateType",
155148
Input: []codersdk.GitAuthConfig{{

coderd/gitauth_test.go

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,16 @@ func TestGitAuthByID(t *testing.T) {
9696
AvatarURL: github.String("https://avatars.githubusercontent.com/u/12345678?v=4"),
9797
})
9898
case "/installs":
99-
httpapi.Write(r.Context(), w, http.StatusOK, []github.Installation{{
100-
ID: github.Int64(12345678),
101-
Account: &github.User{
102-
Login: github.String("coder"),
103-
},
104-
}})
99+
httpapi.Write(r.Context(), w, http.StatusOK, struct {
100+
Installations []github.Installation `json:"installations"`
101+
}{
102+
Installations: []github.Installation{{
103+
ID: github.Int64(12345678),
104+
Account: &github.User{
105+
Login: github.String("coder"),
106+
},
107+
}},
108+
})
105109
}
106110
}))
107111
defer srv.Close()

0 commit comments

Comments
 (0)