Skip to content

Commit

Permalink
chore: delete not needed todos
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorien Grönwald committed Feb 28, 2025
1 parent 43e9f0f commit 5937093
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
10 changes: 0 additions & 10 deletions internal/storage/auth/keycloak/user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,19 +372,9 @@ func TestKeyCloakUserRepo_GetAllByRole(t *testing.T) {
PhoneNumber: "+49 987654321",
Roles: []entities.UserRole{entities.UserRoleTbz},
}
user5 := &entities.User{
Username: "user5",
FirstName: "Peter",
LastName: "Doe",
Email: "user5@green-ecolution.de",
EmployeeID: "EMP003",
PhoneNumber: "+49 987654321",
Roles: []entities.UserRole{entities.UserRoleTbz},
}

suite.EnsureUserExists(t, user3)
suite.EnsureUserExists(t, user4)
suite.EnsureUserExists(t, user5)

// when
users, err := userRepo.GetAllByRole(context.Background(), entities.UserRoleGreenEcolution)
Expand Down
5 changes: 3 additions & 2 deletions internal/storage/postgres/tree/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,9 @@ func (r *TreeRepository) GetSensorByTreeID(ctx context.Context, treeID int32) (*
return nil, err
}

if err := r.store.MapSensorFields(ctx, data); err != nil { // TODO: handle error
return nil, err
if err := r.store.MapSensorFields(ctx, data); err != nil {
log.Debug("failed to convert sensor data", "error", err)
return nil, r.store.MapError(err, sqlc.Sensor{})
}

return data, nil
Expand Down
2 changes: 0 additions & 2 deletions internal/storage/postgres/watering_plan/watering_plan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,4 @@ func TestWateringPlanRepository_Delete(t *testing.T) {
// then
assert.Error(t, err)
})

// TODO: Add test cases to check if the user in the pivot table are deleted
}

0 comments on commit 5937093

Please sign in to comment.