add delete precondition
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user