Skip to content

Commit 97afaf6

Browse files
committed
Fill in missing mock methods to fix the test
1 parent 0575cf7 commit 97afaf6

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

internal/mock/postgres_roles.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ type PostgresRolesService struct {
2121
DeleteFnInvoked bool
2222
ResetDefaultRoleFn func(context.Context, *ps.ResetDefaultRoleRequest) (*ps.PostgresRole, error)
2323
ResetDefaultRoleFnInvoked bool
24+
ResetPasswordFn func(context.Context, *ps.ResetPostgresRolePasswordRequest) (*ps.PostgresRole, error)
25+
ResetPasswordFnInvoked bool
26+
ReassignObjectsFn func(context.Context, *ps.ReassignPostgresRoleObjectsRequest) error
27+
ReassignObjectsFnInvoked bool
2428
}
2529

2630
func (s *PostgresRolesService) List(ctx context.Context, req *ps.ListPostgresRolesRequest, opts ...ps.ListOption) ([]*ps.PostgresRole, error) {
@@ -57,3 +61,13 @@ func (s *PostgresRolesService) ResetDefaultRole(ctx context.Context, req *ps.Res
5761
s.ResetDefaultRoleFnInvoked = true
5862
return s.ResetDefaultRoleFn(ctx, req)
5963
}
64+
65+
func (s *PostgresRolesService) ResetPassword(ctx context.Context, req *ps.ResetPostgresRolePasswordRequest) (*ps.PostgresRole, error) {
66+
s.ResetPasswordFnInvoked = true
67+
return s.ResetPasswordFn(ctx, req)
68+
}
69+
70+
func (s *PostgresRolesService) ReassignObjects(ctx context.Context, req *ps.ReassignPostgresRoleObjectsRequest) error {
71+
s.ReassignObjectsFnInvoked = true
72+
return s.ReassignObjectsFn(ctx, req)
73+
}

0 commit comments

Comments
 (0)