Skip to content

Commit bcea54a

Browse files
committed
linting
1 parent e9d7029 commit bcea54a

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

coderd/database/dbmem/dbmem.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8354,7 +8354,7 @@ func (q *FakeQuerier) ListWorkspaceAgentPortShares(_ context.Context, workspaceI
83548354
return shares, nil
83558355
}
83568356

8357-
func (q *FakeQuerier) OIDCClaimFields(ctx context.Context, organizationID uuid.UUID) ([]string, error) {
8357+
func (q *FakeQuerier) OIDCClaimFields(_ context.Context, organizationID uuid.UUID) ([]string, error) {
83588358
orgMembers := q.getOrganizationMemberNoLock(organizationID)
83598359

83608360
var fields []string

coderd/database/oidcclaims_test.go

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,7 @@ type userGenerator struct {
137137
}
138138

139139
func (g userGenerator) noLink(lt database.LoginType) database.User {
140-
return g.user(lt, false, nil)
141-
}
142-
143-
func (g userGenerator) withLink(lt database.LoginType, rawJSON json.RawMessage) database.User {
144-
return g.user(lt, true, rawJSON)
145-
}
146140

147-
func (g userGenerator) user(lt database.LoginType, createLink bool, rawJSON json.RawMessage) database.User {
148141
t := g.t
149142
db := g.db
150143

@@ -153,13 +146,17 @@ func (g userGenerator) user(lt database.LoginType, createLink bool, rawJSON json
153146
u := dbgen.User(t, db, database.User{
154147
LoginType: lt,
155148
})
149+
return u
150+
}
156151

157-
if !createLink {
158-
return u
159-
}
152+
func (g userGenerator) withLink(lt database.LoginType, rawJSON json.RawMessage) database.User {
153+
t := g.t
154+
db := g.db
155+
156+
user := g.noLink(lt)
160157

161158
link := dbgen.UserLink(t, db, database.UserLink{
162-
UserID: u.ID,
159+
UserID: user.ID,
163160
LoginType: lt,
164161
})
165162

@@ -188,7 +185,7 @@ func (g userGenerator) user(lt database.LoginType, createLink bool, rawJSON json
188185
require.NoError(t, err)
189186
}
190187

191-
return u
188+
return user
192189
}
193190

194191
type rawUpdater interface {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy