Skip to content

Commit dffeb16

Browse files
committed
Fix import
1 parent a1b716b commit dffeb16

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

coderd/coderdtest/oidctest/idp.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,6 @@ func (f *FakeIDP) authenticateOIDClientRequest(t testing.TB, req *http.Request)
355355
values, err := url.ParseQuery(string(data))
356356
if !assert.NoError(t, err, "parse token request values") {
357357
return nil, xerrors.New("invalid token request")
358-
359358
}
360359

361360
if !assert.Equal(t, f.clientID, values.Get("client_id"), "client_id mismatch") {
@@ -419,7 +418,7 @@ func (f *FakeIDP) httpHandler(t testing.TB) http.Handler {
419418
state := r.URL.Query().Get("state")
420419

421420
scope := r.URL.Query().Get("scope")
422-
var _ = scope
421+
_ = scope
423422

424423
responseType := r.URL.Query().Get("response_type")
425424
switch responseType {
@@ -557,7 +556,6 @@ func (f *FakeIDP) httpHandler(t testing.TB) http.Handler {
557556
http.Error(rw, fmt.Sprintf("invalid user info request: %s", err.Error()), http.StatusBadRequest)
558557
return
559558
}
560-
var _ = token
561559

562560
email, ok := f.accessTokens.Load(token)
563561
if !ok {

coderd/userauth_test.go

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ import (
2626
"github.com/coder/coder/v2/coderd/database/dbgen"
2727
"github.com/coder/coder/v2/coderd/database/dbtestutil"
2828
"github.com/coder/coder/v2/codersdk"
29-
"github.com/coder/coder/v2/enterprise/coderd/coderdenttest"
30-
"github.com/coder/coder/v2/enterprise/coderd/license"
3129
"github.com/coder/coder/v2/testutil"
3230
)
3331

@@ -49,16 +47,8 @@ func TestOIDCOauthLoginWithExisting(t *testing.T) {
4947
cfg.IgnoreUserInfo = true
5048
})
5149

52-
client, _, api, _ := coderdenttest.NewWithAPI(t, &coderdenttest.Options{
53-
Options: &coderdtest.Options{
54-
OIDCConfig: cfg,
55-
},
56-
LicenseOptions: &coderdenttest.LicenseOptions{
57-
Features: license.Features{
58-
codersdk.FeatureUserRoleManagement: 1,
59-
codersdk.FeatureTemplateRBAC: 1,
60-
},
61-
},
50+
client, _, api := coderdtest.NewWithAPI(t, &coderdtest.Options{
51+
OIDCConfig: cfg,
6252
})
6353

6454
const username = "alice"

0 commit comments

Comments
 (0)