// need to set the resource version or else the Create() fails
// need to set the resource version or else the Create() fails
By("defer: re-create host0 node object")
_,err:=nodeClient.Create(targetNode)
_,err:=nodeClient.Create(targetNode)
framework.ExpectNoError(err,"defer: Unable to re-create the deleted node")
framework.ExpectNoError(err,fmt.Sprintf("defer: Unable to re-create the deleted node object %q",targetNode.Name))
}
}
numNodes:=countReadyNodes(f.ClientSet,host0Name)
By("defer: verify the number of ready nodes")
numNodes:=countReadyNodes(cs,host0Name)
Expect(numNodes).To(Equal(origNodeCnt),fmt.Sprintf("defer: Requires current node count (%d) to return to original node count (%d)",numNodes,origNodeCnt))
Expect(numNodes).To(Equal(origNodeCnt),fmt.Sprintf("defer: Requires current node count (%d) to return to original node count (%d)",numNodes,origNodeCnt))
}
}()
}()
By("creating host0Pod on node0")
By("creating host0Pod on node0")
_,err=podClient.Create(host0Pod)
_,err=podClient.Create(host0Pod)
framework.ExpectNoError(err,fmt.Sprintf("Failed to create host0Pod: %v",err))
framework.ExpectNoError(err,fmt.Sprintf("Failed to create host0Pod: %v",err))