Remove use of testapi codecs, selflink, resourcepath functions

This commit is contained in:
Jordan Liggitt
2019-12-13 11:28:11 -05:00
parent bb90f0ff94
commit 5d5b444c4d
31 changed files with 146 additions and 142 deletions

View File

@@ -24,14 +24,11 @@ import (
serverstorage "k8s.io/apiserver/pkg/server/storage"
etcd3testing "k8s.io/apiserver/pkg/storage/etcd3/testing"
"k8s.io/apiserver/pkg/storage/storagebackend"
"k8s.io/kubernetes/pkg/api/testapi"
"k8s.io/kubernetes/pkg/kubeapiserver"
)
func NewEtcdStorage(t *testing.T, group string) (*storagebackend.Config, *etcd3testing.EtcdTestServer) {
server, config := etcd3testing.NewUnsecuredEtcd3TestClientServer(t)
config.Codec = testapi.Groups[group].StorageCodec()
return config, server
return NewEtcdStorageForResource(t, schema.GroupResource{Group: group, Resource: "any"})
}
func NewEtcdStorageForResource(t *testing.T, resource schema.GroupResource) (*storagebackend.Config, *etcd3testing.EtcdTestServer) {