Private EtcdHelper
This commit is contained in:
@@ -47,16 +47,16 @@ func (fakeConnectionInfoGetter) GetConnectionInfo(host string) (string, uint, ht
|
||||
return "http", 12345, nil, nil
|
||||
}
|
||||
|
||||
func newHelper(t *testing.T) (*tools.FakeEtcdClient, tools.EtcdHelper) {
|
||||
func newEtcdStorage(t *testing.T) (*tools.FakeEtcdClient, tools.StorageInterface) {
|
||||
fakeEtcdClient := tools.NewFakeEtcdClient(t)
|
||||
fakeEtcdClient.TestIndex = true
|
||||
helper := tools.NewEtcdHelper(fakeEtcdClient, latest.Codec, etcdtest.PathPrefix())
|
||||
return fakeEtcdClient, helper
|
||||
etcdStorage := tools.NewEtcdStorage(fakeEtcdClient, latest.Codec, etcdtest.PathPrefix())
|
||||
return fakeEtcdClient, etcdStorage
|
||||
}
|
||||
|
||||
func newStorage(t *testing.T) (*REST, *tools.FakeEtcdClient) {
|
||||
fakeEtcdClient, h := newHelper(t)
|
||||
storage, _ := NewStorage(h, fakeConnectionInfoGetter{})
|
||||
fakeEtcdClient, s := newEtcdStorage(t)
|
||||
storage, _ := NewStorage(s, fakeConnectionInfoGetter{})
|
||||
return storage, fakeEtcdClient
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user