Refactoring of get etcd tests.

Refactoring of get etcd tests: introudced new generic resttest, TestGet; Converted all etcd tests to use it.
This commit is contained in:
Jerzy Szczepkowski
2015-08-11 09:20:21 +02:00
parent 56fb29a83a
commit f09a08d15a
11 changed files with 179 additions and 515 deletions

View File

@@ -136,7 +136,7 @@ func (f *FakeEtcdClient) Get(key string, sort, recursive bool) (*etcd.Response,
result := f.Data[key]
if result.R == nil {
if _, ok := f.expectNotFoundGetSet[key]; !ok {
f.t.Fatalf("data for %s was not defined prior to invoking Get", key)
f.t.Logf("data for %s was not defined prior to invoking Get", key)
}
return &etcd.Response{}, f.NewError(EtcdErrorCodeNotFound)
}