kubectl: simplify deepcopy calls

This commit is contained in:
Dr. Stefan Schimanski
2017-08-15 14:13:20 +02:00
parent 1d633b7fdd
commit c0dbe9a900
9 changed files with 40 additions and 39 deletions

View File

@@ -74,10 +74,9 @@ func TestMain(m *testing.M) {
},
Status: v1.NodeStatus{},
}
clone, _ := api.Scheme.DeepCopy(node)
// A copy of the same node, but cordoned.
cordoned_node = clone.(*v1.Node)
cordoned_node = node.DeepCopy()
cordoned_node.Spec.Unschedulable = true
os.Exit(m.Run())
}