Propagate error from creating cacher and storage decorators up

This commit is contained in:
wojtekt
2019-07-15 09:34:08 +02:00
parent ac2c1ce08a
commit ee13be2884
12 changed files with 129 additions and 51 deletions

View File

@@ -34,7 +34,10 @@ import (
func newStorage(t *testing.T) (*ScaleREST, *etcd3testing.EtcdTestServer, storage.Interface, factory.DestroyFunc) {
etcdStorage, server := registrytest.NewEtcdStorage(t, "")
restOptions := generic.RESTOptions{StorageConfig: etcdStorage, Decorator: generic.UndecoratedStorage, DeleteCollectionWorkers: 1, ResourcePrefix: "controllers"}
s, d := generic.NewRawStorage(etcdStorage)
s, d, err := generic.NewRawStorage(etcdStorage)
if err != nil {
t.Fatalf("Couldn't create storage: %v", err)
}
destroyFunc := func() {
d()
server.Terminate(t)