Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoandredinis committed Sep 18, 2024
1 parent 2530c0e commit 912cd63
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions lib/cache/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ import (
"github.com/gravitational/teleport/api/types/trait"
"github.com/gravitational/teleport/api/types/userloginstate"
"github.com/gravitational/teleport/api/types/userprovisioning"
"github.com/gravitational/teleport/api/types/usertasks"
"github.com/gravitational/teleport/lib/backend"
"github.com/gravitational/teleport/lib/backend/lite"
"github.com/gravitational/teleport/lib/backend/memory"
Expand Down Expand Up @@ -2307,9 +2308,17 @@ func newUserTasks(t *testing.T, name string) *usertasksv1.UserTask {
t.Helper()

return &usertasksv1.UserTask{
Kind: types.KindUserTask,
Version: types.V1,
Metadata: &headerv1.Metadata{
Name: name,
},
Spec: &usertasksv1.UserTaskSpec{
Integration: "my-integration",
TaskType: usertasks.TaskTypeDiscoverEC2,
IssueType: "my-issue-type",
DiscoverEc2: &usertasksv1.DiscoverEC2{},
},
}
}

Expand Down
4 changes: 2 additions & 2 deletions lib/services/local/user_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ func NewUserTasksService(backend backend.Backend) (*UserTasksService, error) {
service, err := generic.NewServiceWrapper(
generic.ServiceWrapperConfig[*usertasksv1.UserTask]{
Backend: backend,
ResourceKind: types.KindAccessGraphSecretAuthorizedKey,
BackendPrefix: authorizedKeysPrefix,
ResourceKind: types.KindUserTask,
BackendPrefix: userTasksKey,
MarshalFunc: services.MarshalProtoResource[*usertasksv1.UserTask],
UnmarshalFunc: services.UnmarshalProtoResource[*usertasksv1.UserTask],
})
Expand Down

0 comments on commit 912cd63

Please sign in to comment.