refact(controller): Use session repo factory that takes options

This commit is contained in:
Timothy Messier committed 2022-09-07 17:53:40 +00:00
1 parent 68568828e6
commit febf0b9984
4 files changed
+13 -13

No files matched your search

+1 -1
View File
@@ -25,7 +25,7 @@ type (
StaticRepoFactory func() (*static.Repository, error)
PluginHostRepoFactory func() (*pluginhost.Repository, error)
HostPluginRepoFactory func() (*hostplugin.Repository, error)
SessionRepoFactory func() (*session.Repository, error)
SessionRepoFactory session.RepositoryFactory // TODO refactor and remove this
ConnectionRepoFactory func() (*session.ConnectionRepository, error)
TargetRepoFactory func() (*target.Repository, error)
WorkerAuthRepoStorageFactory func() (*server.WorkerAuthRepositoryStorage, error)
@@ -44,8 +44,8 @@ func TestListingScopeIds(t *testing.T) {
s, err := groups.NewService(iamRepoFn)
require.NoError(t, err)
sessionsRepoFn := func() (*session.Repository, error) {
return session.NewRepository(rw, rw, kms)
sessionsRepoFn := func(opt ...session.Option) (*session.Repository, error) {
return session.NewRepository(rw, rw, kms, opt...)
}
sess, err := sessions.NewService(sessionsRepoFn, iamRepoFn)
require.NoError(t, err)