mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
orphan when kubectl delete --cascade=false
This commit is contained in:
@@ -140,8 +140,9 @@ func TestOrphanDependentsInDeleteObject(t *testing.T) {
|
||||
t.Errorf("unexpected output: %s", buf.String())
|
||||
}
|
||||
|
||||
// Test that delete options should be nil when cascade is false.
|
||||
expectedOrphanDependents = nil
|
||||
// Test that delete options should be set to orphan when cascade is false.
|
||||
trueVar := true
|
||||
expectedOrphanDependents = &trueVar
|
||||
buf, errBuf = bytes.NewBuffer([]byte{}), bytes.NewBuffer([]byte{})
|
||||
cmd = NewCmdDelete(f, buf, errBuf)
|
||||
cmd.Flags().Set("namespace", "test")
|
||||
|
||||
Reference in New Issue
Block a user