Update e2e tests to list only schedulable nodes, to make them work with master Node registered.

This commit is contained in:
gmarek
2015-12-10 15:35:58 +01:00
parent 775369a8f1
commit f38455ddc3
26 changed files with 67 additions and 101 deletions

View File

@@ -429,8 +429,7 @@ func (config *KubeProxyTestConfig) setup() {
}
By("Getting node addresses")
nodeList, err := config.f.Client.Nodes().List(api.ListOptions{})
Expect(err).NotTo(HaveOccurred(), fmt.Sprintf("Failed to get node list: %v", err))
nodeList := ListSchedulableNodesOrDie(config.f.Client)
config.externalAddrs = NodeAddresses(nodeList, api.NodeExternalIP)
if len(config.externalAddrs) < 2 {
// fall back to legacy IPs
@@ -468,8 +467,7 @@ func (config *KubeProxyTestConfig) cleanup() {
}
func (config *KubeProxyTestConfig) createNetProxyPods(podName string, selector map[string]string) []*api.Pod {
nodes, err := config.f.Client.Nodes().List(api.ListOptions{})
Expect(err).NotTo(HaveOccurred())
nodes := ListSchedulableNodesOrDie(config.f.Client)
// create pods, one for each node
createdPods := make([]*api.Pod, 0, len(nodes.Items))