Node e2e test fixes:

- Improve documentation and method naming
- Fix command this is run remotely
- Never reschedule the busybox logging test pod since it is supposed to terminate
- Update log test condition retrylogic to correctly retry instead of failing the test
- localhost -> 127.0.0.1 to work on coreos
- give name to etcd to work on coreos
- allow using full hostname for nodename for coreos
This commit is contained in:
Phillip Wittrock
2015-12-03 14:27:51 -08:00
parent 229f40e69f
commit ad37e2654e
5 changed files with 76 additions and 54 deletions

View File

@@ -83,9 +83,9 @@ func main() {
go func(host string) {
out, err := runTests(host)
if err != nil {
glog.Infof("Failure Finished Test Suite %s %v", out, err)
glog.Infof("Failure Finished Host %s Test Suite %s %v", host, out, err)
} else {
glog.Infof("Success Finished Test Suite %s", out)
glog.Infof("Success Finished Host %s Test Suite %s", host, out)
}
w.Done()
}(h)
@@ -113,20 +113,21 @@ func WaitForUser() {
u.Done()
}
func runTests(host string) ([]byte, error) {
func runTests(fullhost string) ([]byte, error) {
host := strings.Split(fullhost, ".")[0]
c := gcloud.NewGCloudClient(host, *zone)
// TODO(pwittrock): Come up with something better for bootstrapping the environment.
eh, err := c.CopyAndWaitTillHealthy(
false, false, "4001", healthyTimeoutDuration, "v2/keys/", "etcd", "--data-dir", "./")
eh, err := c.RunAndWaitTillHealthy(
false, false, "4001", healthyTimeoutDuration, "v2/keys/", "etcd", "--data-dir", "./", "--name", "e2e-node")
defer func() { eh.TearDown() }()
if err != nil {
return nil, fmt.Errorf("Host %s failed to run command %v", host, err)
}
apiBin := filepath.Join(kubeRoot, *kubeOutputRelPath, "kube-apiserver")
ah, err := c.CopyAndWaitTillHealthy(
ah, err := c.RunAndWaitTillHealthy(
true, true, "8080", healthyTimeoutDuration, "healthz", apiBin, "--service-cluster-ip-range",
"10.0.0.1/24", "--insecure-bind-address", "0.0.0.0", "--etcd-servers", "http://localhost:4001",
"10.0.0.1/24", "--insecure-bind-address", "0.0.0.0", "--etcd-servers", "http://127.0.0.1:4001",
"--cluster-name", "kubernetes", "--v", "2", "--kubelet-port", "10250")
defer func() { ah.TearDown() }()
if err != nil {
@@ -134,8 +135,8 @@ func runTests(host string) ([]byte, error) {
}
kubeletBin := filepath.Join(kubeRoot, *kubeOutputRelPath, "kubelet")
kh, err := c.CopyAndWaitTillHealthy(
true, true, "10255", healthyTimeoutDuration, "healthz", kubeletBin, "--api-servers", "http://localhost:8080",
kh, err := c.RunAndWaitTillHealthy(
true, true, "10255", healthyTimeoutDuration, "healthz", kubeletBin, "--api-servers", "http://127.0.0.1:8080",
"--logtostderr", "--address", "0.0.0.0", "--port", "10250")
defer func() { kh.TearDown() }()
if err != nil {
@@ -150,8 +151,8 @@ func runTests(host string) ([]byte, error) {
ginkoTests := filepath.Join(kubeRoot, ginkoTestRelPath)
return exec.Command(
"ginkgo", ginkoTests, "--",
"--kubelet-address", fmt.Sprintf("http://localhost:%s", kh.LPort),
"--api-server-address", fmt.Sprintf("http://localhost:%s", ah.LPort),
"--node-name", host,
"--kubelet-address", fmt.Sprintf("http://127.0.0.1:%s", kh.LPort),
"--api-server-address", fmt.Sprintf("http://127.0.0.1:%s", ah.LPort),
"--node-name", fullhost,
"-logtostderr").CombinedOutput()
}