Storage: Update storage.Interface for backend (#90382)

This commit is contained in:
Ryan McKinley
2024-07-18 07:47:47 -07:00
committed by GitHub
parent 09e10ae9e0
commit 6e39f24588
21 changed files with 682 additions and 1061 deletions
+5 -1
View File
@@ -29,6 +29,10 @@ import (
grafanaregistry "github.com/grafana/grafana/pkg/apiserver/registry/generic"
)
var NewContext = func() context.Context {
return context.Background()
}
// KeyFunc is a function that generates keys for tests.
// All tests use the "pods" resource, so the resource is hardcoded to "pods".
var KeyFunc = func(namespace, name string) string {
@@ -97,7 +101,7 @@ func testPropagateStore(ctx context.Context, t *testing.T, store storage.Interfa
}
setOutput := &example.Pod{}
if err := store.Create(ctx, key, obj, setOutput, 0); err != nil {
t.Fatalf("Set failed: %v", err)
t.Fatalf("Create failed: %v", err)
}
return key, setOutput
}