Merge pull request #12975 from wojtek-t/switch_cacher_for_pods

Switch on Cacher for pods, endpoints and nodes.
This commit is contained in:
Jerzy Szczepkowski
2015-08-21 10:28:38 +02:00
10 changed files with 151 additions and 21 deletions

View File

@@ -76,7 +76,7 @@ func waitForUpToDateCache(cacher *storage.Cacher, resourceVersion uint64) error
return wait.Poll(10*time.Millisecond, 100*time.Millisecond, ready)
}
func TestList(t *testing.T) {
func TestListFromMemory(t *testing.T) {
fakeClient := tools.NewFakeEtcdClient(t)
prefixedKey := etcdtest.AddPrefix("pods")
fakeClient.ExpectNotFoundGet(prefixedKey)
@@ -151,7 +151,7 @@ func TestList(t *testing.T) {
}
result := &api.PodList{}
if err := cacher.List("pods/ns", result); err != nil {
if err := cacher.ListFromMemory("pods/ns", result); err != nil {
t.Errorf("unexpected error: %v", err)
}
if result.ListMeta.ResourceVersion != "5" {