Small cleanup in density e2e test.

This commit is contained in:
gmarek
2016-01-04 17:26:24 +01:00
parent ab6edd8170
commit 5cc420c408
2 changed files with 15 additions and 33 deletions

View File

@@ -136,20 +136,6 @@ func (f *Framework) afterEach() {
Failf("All nodes should be ready after test, %v", err)
}
if testContext.DeleteNamespace {
By(fmt.Sprintf("Destroying namespace %q for this suite.", f.Namespace.Name))
timeout := 5 * time.Minute
if f.NamespaceDeletionTimeout != 0 {
timeout = f.NamespaceDeletionTimeout
}
if err := deleteNS(f.Client, f.Namespace.Name, timeout); err != nil {
Failf("Couldn't delete ns %q: %s", f.Namespace.Name, err)
}
} else {
Logf("Found DeleteNamespace=false, skipping namespace deletion!")
}
summaries := make([]TestDataSummary, 0)
if testContext.GatherKubeSystemResourceUsageData {
summaries = append(summaries, f.gatherer.stopAndSummarize([]int{50, 90, 99, 100}, f.addonResourceConstraints))
@@ -176,6 +162,20 @@ func (f *Framework) afterEach() {
}
}
if testContext.DeleteNamespace {
By(fmt.Sprintf("Destroying namespace %q for this suite.", f.Namespace.Name))
timeout := 5 * time.Minute
if f.NamespaceDeletionTimeout != 0 {
timeout = f.NamespaceDeletionTimeout
}
if err := deleteNS(f.Client, f.Namespace.Name, timeout); err != nil {
Failf("Couldn't delete ns %q: %s", f.Namespace.Name, err)
}
} else {
Logf("Found DeleteNamespace=false, skipping namespace deletion!")
}
outputTypes := strings.Split(testContext.OutputPrintType, ",")
for _, printType := range outputTypes {
switch printType {