Carry dependencies through operator commands
This commit is contained in:
@@ -426,23 +426,6 @@ func TestExecuteRemoteSessionMismatchFails(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func restoreAppConfigTestGlobals(t *testing.T, fake *storage.FakeBackend, storeInitCalls *int, sessionDefaults []string) {
|
||||
t.Helper()
|
||||
origStoreFn := newObjectStoreFromConfigFn
|
||||
origSessionDefaults := append([]string(nil), config.DefaultSessionConfigSearchPaths...)
|
||||
config.DefaultSessionConfigSearchPaths = append([]string(nil), sessionDefaults...)
|
||||
newObjectStoreFromConfigFn = func(context.Context, *config.Config) (storage.ObjectStore, error) {
|
||||
if storeInitCalls != nil {
|
||||
(*storeInitCalls)++
|
||||
}
|
||||
return fake, nil
|
||||
}
|
||||
t.Cleanup(func() {
|
||||
newObjectStoreFromConfigFn = origStoreFn
|
||||
config.DefaultSessionConfigSearchPaths = origSessionDefaults
|
||||
})
|
||||
}
|
||||
|
||||
func remoteSessionLoaderDependencies(fake *storage.FakeBackend) (commandDependencies, *int) {
|
||||
storeInitCalls := new(int)
|
||||
return fakeCommandDependencies(fake, storeInitCalls), storeInitCalls
|
||||
|
||||
Reference in New Issue
Block a user