chore: Upgrade to Go 1.19 (#3617)

This is required as part of #3505.
This commit is contained in:
Kyle Carberry
2022-08-21 17:32:53 -05:00
committed by GitHub
parent d37fb054c8
commit b0fe9bcdd1
52 changed files with 144 additions and 86 deletions

View File

@ -76,6 +76,7 @@ func TestUserAuthMethods(t *testing.T) {
})
}
// nolint:bodyclose
func TestUserOAuth2Github(t *testing.T) {
t.Parallel()
t.Run("NotInAllowedOrganization", func(t *testing.T) {
@ -281,6 +282,7 @@ func TestUserOAuth2Github(t *testing.T) {
})
}
// nolint:bodyclose
func TestUserOIDC(t *testing.T) {
t.Parallel()
@ -456,7 +458,7 @@ func oauth2Callback(t *testing.T, client *codersdk.Client) *http.Response {
state := "somestate"
oauthURL, err := client.URL.Parse("/api/v2/users/oauth2/github/callback?code=asd&state=" + state)
require.NoError(t, err)
req, err := http.NewRequest("GET", oauthURL.String(), nil)
req, err := http.NewRequestWithContext(context.Background(), "GET", oauthURL.String(), nil)
require.NoError(t, err)
req.AddCookie(&http.Cookie{
Name: codersdk.OAuth2StateKey,
@ -478,7 +480,7 @@ func oidcCallback(t *testing.T, client *codersdk.Client) *http.Response {
state := "somestate"
oauthURL, err := client.URL.Parse("/api/v2/users/oidc/callback?code=asd&state=" + state)
require.NoError(t, err)
req, err := http.NewRequest("GET", oauthURL.String(), nil)
req, err := http.NewRequestWithContext(context.Background(), "GET", oauthURL.String(), nil)
require.NoError(t, err)
req.AddCookie(&http.Cookie{
Name: codersdk.OAuth2StateKey,