Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
0353c387
"frontend/src/components/vscode:/vscode.git/clone" did not exist on "a1425b457d91f59c526a2f56cc4f7c78b8c3c3c6"
Commit
0353c387
authored
Apr 20, 2026
by
IanShaw027
Browse files
test: update user service stubs for identity summaries
parent
4e0e6915
Changes
2
Show whitespace changes
Inline
Side-by-side
backend/internal/service/billing_cache_service_singleflight_test.go
View file @
0353c387
...
@@ -86,6 +86,10 @@ func (s *balanceLoadUserRepoStub) GetByID(ctx context.Context, id int64) (*User,
...
@@ -86,6 +86,10 @@ func (s *balanceLoadUserRepoStub) GetByID(ctx context.Context, id int64) (*User,
return
&
User
{
ID
:
id
,
Balance
:
s
.
balance
},
nil
return
&
User
{
ID
:
id
,
Balance
:
s
.
balance
},
nil
}
}
func
(
s
*
balanceLoadUserRepoStub
)
ListUserAuthIdentities
(
context
.
Context
,
int64
)
([]
UserAuthIdentityRecord
,
error
)
{
return
nil
,
nil
}
func
TestBillingCacheServiceGetUserBalance_Singleflight
(
t
*
testing
.
T
)
{
func
TestBillingCacheServiceGetUserBalance_Singleflight
(
t
*
testing
.
T
)
{
cache
:=
&
billingCacheMissStub
{}
cache
:=
&
billingCacheMissStub
{}
userRepo
:=
&
balanceLoadUserRepoStub
{
userRepo
:=
&
balanceLoadUserRepoStub
{
...
...
backend/internal/service/user_service_test.go
View file @
0353c387
...
@@ -100,6 +100,9 @@ func (m *mockUserRepo) RemoveGroupFromAllowedGroups(context.Context, int64) (int
...
@@ -100,6 +100,9 @@ func (m *mockUserRepo) RemoveGroupFromAllowedGroups(context.Context, int64) (int
return
0
,
nil
return
0
,
nil
}
}
func
(
m
*
mockUserRepo
)
AddGroupToAllowedGroups
(
context
.
Context
,
int64
,
int64
)
error
{
return
nil
}
func
(
m
*
mockUserRepo
)
AddGroupToAllowedGroups
(
context
.
Context
,
int64
,
int64
)
error
{
return
nil
}
func
(
m
*
mockUserRepo
)
ListUserAuthIdentities
(
context
.
Context
,
int64
)
([]
UserAuthIdentityRecord
,
error
)
{
return
nil
,
nil
}
func
(
m
*
mockUserRepo
)
UpdateTotpSecret
(
context
.
Context
,
int64
,
*
string
)
error
{
return
nil
}
func
(
m
*
mockUserRepo
)
UpdateTotpSecret
(
context
.
Context
,
int64
,
*
string
)
error
{
return
nil
}
func
(
m
*
mockUserRepo
)
EnableTotp
(
context
.
Context
,
int64
)
error
{
return
nil
}
func
(
m
*
mockUserRepo
)
EnableTotp
(
context
.
Context
,
int64
)
error
{
return
nil
}
func
(
m
*
mockUserRepo
)
DisableTotp
(
context
.
Context
,
int64
)
error
{
return
nil
}
func
(
m
*
mockUserRepo
)
DisableTotp
(
context
.
Context
,
int64
)
error
{
return
nil
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment