statusErr:=kubeerr.NewConflict(schema.GroupResource{Group:"",Resource:"rc"},"test-rc",fmt.Errorf("the object has been modified. Please apply at first."))
statusErr:=kubeerr.NewConflict(schema.GroupResource{Group:"",Resource:"rc"},"test-rc",fmt.Errorf("the object has been modified. Please apply at first."))
statusErr:=kubeerr.NewConflict(schema.GroupResource{Group:"",Resource:"rc"},"test-rc",fmt.Errorf("the object has been modified. Please apply at first."))
statusErr:=kubeerr.NewConflict(schema.GroupResource{Group:"",Resource:"rc"},"test-rc",fmt.Errorf("the object has been modified. Please apply at first."))
t.Fatalf("%s: unexpected non-error when using %s",test.description,currMethod)
}
}else{
ifsaw_fatal{
t.Fatalf("%s: unexpected error when using %s: %s",test.description,currMethod,fatal_msg)
}
}
}
iftest.expectDelete{
// Test Delete
if!testEviction&&!deleted{
t.Fatalf("%s: pod never deleted",test.description)
}
// Test Eviction
iftestEviction&&!evicted{
t.Fatalf("%s: pod never evicted",test.description)
iftest.expectDelete{
// Test Delete
if!testEviction&&!deleted{
t.Fatalf("%s: pod never deleted",test.description)
}
// Test Eviction
iftestEviction&&!evicted{
t.Fatalf("%s: pod never evicted",test.description)
}
}
}
if!test.expectDelete{
ifdeleted{
t.Fatalf("%s: unexpected delete when using %s",test.description,currMethod)
if!test.expectDelete{
ifdeleted{
t.Fatalf("%s: unexpected delete when using %s",test.description,currMethod)
}
}
}
iflen(test.expectWarning)>0{
iflen(errBuf.String())==0{
t.Fatalf("%s: expected warning, but found no stderr output",test.description)
}
iflen(test.expectWarning)>0{
iflen(errBuf.String())==0{
t.Fatalf("%s: expected warning, but found no stderr output",test.description)
}
iferrBuf.String()!=test.expectWarning{
t.Fatalf("%s: actual warning message did not match expected warning message.\n Expecting: %s\n Got: %s",test.description,test.expectWarning,errBuf.String())
iferrBuf.String()!=test.expectWarning{
t.Fatalf("%s: actual warning message did not match expected warning message.\n Expecting: %s\n Got: %s",test.description,test.expectWarning,errBuf.String())
cmd.Flags().Bool("record",false,"Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.")
cmd.Flags().Bool("record",false,"Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.")