Merge pull request #45323 from karataliu/NamespaceDeletionLogFix

Automatic merge from submit-queue (batch tested with PRs 45364, 45369, 45323)

Fix namespace deletion log in e2e test framework.

**What this PR does / why we need it**:
Current log message for namespace deletion will show under wrong condition.

**Which issue this PR fixes**


**Release note**:
NONE
pull/6/head
Kubernetes Submit Queue 2017-05-04 16:47:38 -07:00 committed by GitHub
commit 30575e521e
1 changed files with 3 additions and 4 deletions

View File

@ -258,12 +258,11 @@ func (f *Framework) AfterEach() {
}
}
} else {
if TestContext.DeleteNamespace {
if !TestContext.DeleteNamespace {
Logf("Found DeleteNamespace=false, skipping namespace deletion!")
} else if TestContext.DeleteNamespaceOnFailure {
Logf("Found DeleteNamespaceOnFailure=false, skipping namespace deletion!")
} else {
Logf("Found DeleteNamespaceOnFailure=false and current test failed, skipping namespace deletion!")
}
}
// Paranoia-- prevent reuse!