Merge pull request #27650 from nikhiljindal/fixFedTest

Automatic merge from submit-queue

federation-apiserver test: Fixing the AfterEach order in e2e test

Moving "It" and "AfterEach" into a "Describe" fixes the order of AfterEach.
Verified that now, test.AfterEach is run before running framework.AfterEach.

Removing the temporary disabling of framework.SkipUnlessFederated(f.Client) in AfterEach.

cc @kubernetes/sig-cluster-federation @mml
This commit is contained in:
k8s-merge-robot 2016-06-17 18:48:36 -07:00 committed by GitHub
commit 64f79df54e

View File

@ -34,8 +34,9 @@ import (
var _ = framework.KubeDescribe("Federation apiserver [Feature:Federation]", func() { var _ = framework.KubeDescribe("Federation apiserver [Feature:Federation]", func() {
f := framework.NewDefaultFederatedFramework("federation-cluster") f := framework.NewDefaultFederatedFramework("federation-cluster")
Describe("Cluster objects", func() {
AfterEach(func() { AfterEach(func() {
// framework.SkipUnlessFederated(f.Client) TODO: quinton-hoole: Temporarily disabled framework.SkipUnlessFederated(f.Client)
// Delete registered clusters. // Delete registered clusters.
// This is if a test failed, it should not affect other tests. // This is if a test failed, it should not affect other tests.
@ -47,7 +48,7 @@ var _ = framework.KubeDescribe("Federation apiserver [Feature:Federation]", func
} }
}) })
It("should allow creation and deletion of cluster api objects", func() { It("should be created and deleted successfully", func() {
framework.SkipUnlessFederated(f.Client) framework.SkipUnlessFederated(f.Client)
contexts := f.GetUnderlyingFederatedContexts() contexts := f.GetUnderlyingFederatedContexts()
@ -81,6 +82,7 @@ var _ = framework.KubeDescribe("Federation apiserver [Feature:Federation]", func
} }
framework.Logf("Verified that zero clusters remain") framework.Logf("Verified that zero clusters remain")
}) })
})
}) })
// Verify that the cluster is marked ready. // Verify that the cluster is marked ready.