Small cleanup in density e2e test.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user