Rename storage interfaces
This commit is contained in:
@@ -57,7 +57,7 @@ type REST struct {
|
||||
}
|
||||
|
||||
// NewStorage returns a RESTStorage object that will work against pods.
|
||||
func NewStorage(s storage.StorageInterface, k client.ConnectionInfoGetter) PodStorage {
|
||||
func NewStorage(s storage.Interface, k client.ConnectionInfoGetter) PodStorage {
|
||||
prefix := "/pods"
|
||||
store := &etcdgeneric.Etcd{
|
||||
NewFunc: func() runtime.Object { return &api.Pod{} },
|
||||
|
@@ -41,14 +41,14 @@ import (
|
||||
"github.com/coreos/go-etcd/etcd"
|
||||
)
|
||||
|
||||
func newEtcdStorage(t *testing.T) (*tools.FakeEtcdClient, storage.StorageInterface) {
|
||||
func newEtcdStorage(t *testing.T) (*tools.FakeEtcdClient, storage.Interface) {
|
||||
fakeEtcdClient := tools.NewFakeEtcdClient(t)
|
||||
fakeEtcdClient.TestIndex = true
|
||||
etcdStorage := tools.NewEtcdStorage(fakeEtcdClient, latest.Codec, etcdtest.PathPrefix())
|
||||
return fakeEtcdClient, etcdStorage
|
||||
}
|
||||
|
||||
func newStorage(t *testing.T) (*REST, *BindingREST, *StatusREST, *tools.FakeEtcdClient, storage.StorageInterface) {
|
||||
func newStorage(t *testing.T) (*REST, *BindingREST, *StatusREST, *tools.FakeEtcdClient, storage.Interface) {
|
||||
fakeEtcdClient, etcdStorage := newEtcdStorage(t)
|
||||
storage := NewStorage(etcdStorage, nil)
|
||||
return storage.Pod, storage.Binding, storage.Status, fakeEtcdClient, etcdStorage
|
||||
|
Reference in New Issue
Block a user