Skip to content

Commit

Permalink
Make node E2E tests more transparent
Browse files Browse the repository at this point in the history
  • Loading branch information
pmorie committed Sep 21, 2016
1 parent cfecc2f commit 3539993
Show file tree
Hide file tree
Showing 6 changed files with 145 additions and 92 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ test-e2e: ginkgo generated_files
# INSTANCE_METADATA: For REMOTE=true and running on GCE only.
# GUBERNATOR: For REMOTE=true only. Produce link to Gubernator to view logs.
# Defaults to false.
# PARALLELISM: The number of gingko nodes to run. Defaults to 8.
#
# Example:
# make test-e2e-node FOCUS=Kubelet SKIP=container
Expand Down
3 changes: 2 additions & 1 deletion hack/make-rules/test-e2e-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,9 @@ if [ $remote = true ] ; then
exit $?

else
# Refresh sudo credentials if not running on GCE.
# Refresh sudo credentials for local run
if ! ping -c 1 -q metadata.google.internal &> /dev/null; then
echo "Updating sudo credentials"
sudo -v || exit 1
fi

Expand Down
2 changes: 2 additions & 0 deletions test/e2e_node/runner/local/run_local.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@ func main() {
if err != nil {
glog.Fatalf("Failed to get build output directory: %v", err)
}
glog.Infof("Got build output dir: %v", outputDir)
ginkgo := filepath.Join(outputDir, "ginkgo")
test := filepath.Join(outputDir, "e2e_node.test")
runCommand(ginkgo, *ginkgoFlags, test, "--", *testFlags)
return
}

func runCommand(name string, args ...string) error {
glog.Infof("Running command: %v %v", name, strings.Join(args, " "))
cmd := exec.Command("sh", "-c", strings.Join(append([]string{name}, args...), " "))
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
Expand Down
2 changes: 1 addition & 1 deletion test/e2e_node/services/apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (a *APIServer) Start() error {
}
}()

err = readinessCheck([]string{apiserverHealthCheckURL}, errCh)
err = readinessCheck("apiserver", []string{apiserverHealthCheckURL}, errCh)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e_node/services/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func (e *EtcdServer) Start() error {
errCh <- srv.Serve(l)
}(e.clientListen)

err = readinessCheck([]string{etcdHealthCheckURL}, errCh)
err = readinessCheck("etcd", []string{etcdHealthCheckURL}, errCh)
if err != nil {
return err
}
Expand Down
Loading

0 comments on commit 3539993

Please sign in to comment.