Commit 3fd7e3a5 authored by Lantao Liu's avatar Lantao Liu

Cleanup api service before namespace deletion.

parent f3024879
...@@ -53,18 +53,26 @@ var _ = SIGDescribe("Aggregator", func() { ...@@ -53,18 +53,26 @@ var _ = SIGDescribe("Aggregator", func() {
var ns string var ns string
var c clientset.Interface var c clientset.Interface
var aggrclient *aggregatorclient.Clientset var aggrclient *aggregatorclient.Clientset
// BeforeEachs run in LIFO order, AfterEachs run in FIFO order.
// We want cleanTest to happen before the namespace cleanup AfterEach
// inserted by NewDefaultFramework, so we put this AfterEach in front
// of NewDefaultFramework.
AfterEach(func() {
cleanTest(c, aggrclient, ns)
})
f := framework.NewDefaultFramework("aggregator") f := framework.NewDefaultFramework("aggregator")
// We want namespace initialization BeforeEach inserted by
// NewDefaultFramework to happen before this, so we put this BeforeEach
// after NewDefaultFramework.
BeforeEach(func() { BeforeEach(func() {
c = f.ClientSet c = f.ClientSet
ns = f.Namespace.Name ns = f.Namespace.Name
aggrclient = f.AggregatorClient aggrclient = f.AggregatorClient
}) })
AfterEach(func() {
cleanTest(c, aggrclient, ns)
})
It("Should be able to support the 1.7 Sample API Server using the current Aggregator", func() { It("Should be able to support the 1.7 Sample API Server using the current Aggregator", func() {
// Make sure the relevant provider supports Agggregator // Make sure the relevant provider supports Agggregator
framework.SkipUnlessServerVersionGTE(serverAggregatorVersion, f.ClientSet.Discovery()) framework.SkipUnlessServerVersionGTE(serverAggregatorVersion, f.ClientSet.Discovery())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment