Skip to content

Commit

Permalink
Un-xmlWrap the Test function.
Browse files Browse the repository at this point in the history
  • Loading branch information
spxtr committed Sep 26, 2016
1 parent 234be5a commit 52cfe25
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions hack/e2e.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,15 @@ func run() error {
errs = appendError(errs, xmlWrap("kubectl version", func() error {
return finishRunning("kubectl version", exec.Command("./cluster/kubectl.sh", "version", "--match-server-version=false"))
}))
// Individual tests will create their own JUnit, so don't xmlWrap.
if *skewTests {
errs = appendError(errs, xmlWrap("SkewTest", SkewTest))
errs = appendError(errs, SkewTest())
} else {
errs = appendError(errs, xmlWrap("Test", Test))
if err := xmlWrap("IsUp", IsUp); err != nil {
errs = appendError(errs, err)
} else {
errs = appendError(errs, Test())
}
}
}

Expand Down Expand Up @@ -341,8 +346,8 @@ func Up() error {
}

// Is the e2e cluster up?
func IsUp() bool {
return finishRunning("get status", exec.Command("./hack/e2e-internal/e2e-status.sh")) == nil
func IsUp() error {
return finishRunning("get status", exec.Command("./hack/e2e-internal/e2e-status.sh"))
}

func DumpClusterLogs(location string) error {
Expand Down Expand Up @@ -443,10 +448,6 @@ func SkewTest() error {
}

func Test() error {
if !IsUp() {
return fmt.Errorf("testing requested, but e2e cluster not up!")
}

// TODO(fejta): add a --federated or something similar
if os.Getenv("FEDERATION") != "true" {
return finishRunning("Ginkgo tests", exec.Command("./hack/ginkgo-e2e.sh", strings.Fields(*testArgs)...))
Expand Down

0 comments on commit 52cfe25

Please sign in to comment.