Login: remove unused function (#78442)

* Move test to the db so we test the queries and not just testing the mock

* Remove unused function and dependencies

* Remove unused functions from the database

* Add some integration tests
This commit is contained in:
Karl Persson
2023-11-21 11:44:13 +01:00
committed by GitHub
parent e2f2d8b3d6
commit d42201dbf4
11 changed files with 174 additions and 836 deletions

View File

@@ -33,7 +33,6 @@ func TestUserSync_SyncUserHook(t *testing.T) {
userProtection := &authinfoservice.OSSUserProtectionImpl{}
authFakeNil := &logintest.AuthInfoServiceFake{
ExpectedUser: nil,
ExpectedError: user.ErrUserNotFound,
SetAuthInfoFn: func(ctx context.Context, cmd *login.SetAuthInfoCommand) error {
return nil
@@ -43,7 +42,6 @@ func TestUserSync_SyncUserHook(t *testing.T) {
},
}
authFakeUserID := &logintest.AuthInfoServiceFake{
ExpectedUser: nil,
ExpectedError: nil,
ExpectedUserAuth: &login.UserAuth{
AuthModule: "oauth",
@@ -68,7 +66,6 @@ func TestUserSync_SyncUserHook(t *testing.T) {
}}
userServiceNil := &usertest.FakeUserService{
ExpectedUser: nil,
ExpectedError: user.ErrUserNotFound,
CreateFn: func(ctx context.Context, cmd *user.CreateUserCommand) (*user.User, error) {
return &user.User{