add delete precondition

This commit is contained in:
Chao Xu
2016-03-20 23:15:00 -07:00
parent 590038dcf1
commit 31b425b3a1
71 changed files with 1600 additions and 372 deletions

View File

@@ -99,6 +99,7 @@ func NewTestGenericEtcdRegistry(t *testing.T) (*etcdtesting.EtcdTestServer, *Etc
QualifiedResource: api.Resource("pods"),
CreateStrategy: strategy,
UpdateStrategy: strategy,
DeleteStrategy: strategy,
KeyRootFunc: func(ctx api.Context) string {
return podPrefix
},
@@ -323,7 +324,7 @@ func TestEtcdUpdate(t *testing.T) {
// Test3 outofDate
_, _, err = registry.Update(testContext, podAWithResourceVersion)
if !errors.IsConflict(err) {
t.Errorf("Unexpected error: %v", err)
t.Errorf("Unexpected error updating podAWithResourceVersion: %v", err)
}
// Test4 normal update and verify