mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
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:
commit
64f79df54e
@ -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()
|
||||||
@ -82,6 +83,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.
|
||||||
func isReady(clusterName string, clientset *federation_internalclientset.Clientset) error {
|
func isReady(clusterName string, clientset *federation_internalclientset.Clientset) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user