Merge pull request #98342 from cynepco3hahue/e2e_move_delete_state_file_to_after_each

e2e: move deleteState file to the AfterEach
This commit is contained in:
Kubernetes Prow Robot 2021-02-24 11:10:50 -08:00 committed by GitHub
commit bd902db13d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 13 deletions

View File

@ -627,7 +627,9 @@ func runCPUManagerTests(f *framework.Framework) {
ginkgo.By("wait for the deleted pod to be cleaned up from the state file") ginkgo.By("wait for the deleted pod to be cleaned up from the state file")
waitForStateFileCleanedUp() waitForStateFileCleanedUp()
ginkgo.By("the deleted pod has already been deleted from the state file") ginkgo.By("the deleted pod has already been deleted from the state file")
})
ginkgo.AfterEach(func() {
setOldKubeletConfig(f, oldCfg) setOldKubeletConfig(f, oldCfg)
}) })
} }

View File

@ -880,11 +880,6 @@ func runTopologyManagerTests(f *framework.Framework) {
// Run the tests // Run the tests
runTopologyManagerPolicySuiteTests(f) runTopologyManagerPolicySuiteTests(f)
} }
// restore kubelet config
setOldKubeletConfig(f, oldCfg)
// Delete state file to allow repeated runs
deleteStateFile()
}) })
ginkgo.It("run Topology Manager node alignment test suite", func() { ginkgo.It("run Topology Manager node alignment test suite", func() {
@ -922,12 +917,6 @@ func runTopologyManagerTests(f *framework.Framework) {
runTopologyManagerNodeAlignmentSuiteTests(f, sd, reservedSystemCPUs, policy, numaNodes, coreCount) runTopologyManagerNodeAlignmentSuiteTests(f, sd, reservedSystemCPUs, policy, numaNodes, coreCount)
} }
// restore kubelet config
setOldKubeletConfig(f, oldCfg)
// Delete state file to allow repeated runs
deleteStateFile()
}) })
ginkgo.It("run the Topology Manager pod scope alignment test suite", func() { ginkgo.It("run the Topology Manager pod scope alignment test suite", func() {
@ -956,9 +945,11 @@ func runTopologyManagerTests(f *framework.Framework) {
reservedSystemCPUs := configureTopologyManagerInKubelet(f, oldCfg, policy, scope, configMap, numaNodes) reservedSystemCPUs := configureTopologyManagerInKubelet(f, oldCfg, policy, scope, configMap, numaNodes)
runTMScopeResourceAlignmentTestSuite(f, configMap, reservedSystemCPUs, policy, numaNodes, coreCount) runTMScopeResourceAlignmentTestSuite(f, configMap, reservedSystemCPUs, policy, numaNodes, coreCount)
})
ginkgo.AfterEach(func() {
// restore kubelet config
setOldKubeletConfig(f, oldCfg) setOldKubeletConfig(f, oldCfg)
deleteStateFile()
}) })
} }
@ -969,5 +960,4 @@ var _ = SIGDescribe("Topology Manager [Serial] [Feature:TopologyManager][NodeFea
ginkgo.Context("With kubeconfig updated to static CPU Manager policy run the Topology Manager tests", func() { ginkgo.Context("With kubeconfig updated to static CPU Manager policy run the Topology Manager tests", func() {
runTopologyManagerTests(f) runTopologyManagerTests(f)
}) })
}) })