modify changes due to the ginkgo version updation
Signed-off-by: changzhen <changzhen5@huawei.com>
This commit is contained in:
parent
c617644eaa
commit
d977ae767f
|
@ -38,7 +38,7 @@ export KUBECONFIG=${KARMADA_APISERVER_KUBECONFIG}
|
||||||
export PULL_BASED_CLUSTERS=${PULL_BASED_CLUSTERS}
|
export PULL_BASED_CLUSTERS=${PULL_BASED_CLUSTERS}
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
ginkgo -v -race -failFast ./test/e2e/
|
ginkgo -v -race -fail-fast ./test/e2e/
|
||||||
TESTING_RESULT=$?
|
TESTING_RESULT=$?
|
||||||
|
|
||||||
# Collect logs
|
# Collect logs
|
||||||
|
|
|
@ -31,11 +31,6 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// TestSuiteSetupTimeOut defines the time after which the suite setup times out.
|
|
||||||
TestSuiteSetupTimeOut = 300 * time.Second
|
|
||||||
// TestSuiteTeardownTimeOut defines the time after which the suite tear down times out.
|
|
||||||
TestSuiteTeardownTimeOut = 300 * time.Second
|
|
||||||
|
|
||||||
// pollInterval defines the interval time for a poll operation.
|
// pollInterval defines the interval time for a poll operation.
|
||||||
pollInterval = 5 * time.Second
|
pollInterval = 5 * time.Second
|
||||||
// pollTimeout defines the time after which the poll operation times out.
|
// pollTimeout defines the time after which the poll operation times out.
|
||||||
|
@ -109,7 +104,7 @@ var _ = ginkgo.BeforeSuite(func() {
|
||||||
|
|
||||||
err = setupTestNamespace(testNamespace, kubeClient)
|
err = setupTestNamespace(testNamespace, kubeClient)
|
||||||
gomega.Expect(err).ShouldNot(gomega.HaveOccurred())
|
gomega.Expect(err).ShouldNot(gomega.HaveOccurred())
|
||||||
}, TestSuiteSetupTimeOut.Seconds())
|
})
|
||||||
|
|
||||||
var _ = ginkgo.AfterSuite(func() {
|
var _ = ginkgo.AfterSuite(func() {
|
||||||
// cleanup clusterLabels set by the E2E test
|
// cleanup clusterLabels set by the E2E test
|
||||||
|
@ -122,7 +117,7 @@ var _ = ginkgo.AfterSuite(func() {
|
||||||
// It will not return error even if there is no such namespace in there that may happen in case setup failed.
|
// It will not return error even if there is no such namespace in there that may happen in case setup failed.
|
||||||
err := cleanupTestNamespace(testNamespace, kubeClient)
|
err := cleanupTestNamespace(testNamespace, kubeClient)
|
||||||
gomega.Expect(err).ShouldNot(gomega.HaveOccurred())
|
gomega.Expect(err).ShouldNot(gomega.HaveOccurred())
|
||||||
}, TestSuiteTeardownTimeOut.Seconds())
|
})
|
||||||
|
|
||||||
// setupTestNamespace will create a namespace in control plane and all member clusters, most of cases will run against it.
|
// setupTestNamespace will create a namespace in control plane and all member clusters, most of cases will run against it.
|
||||||
// The reason why we need a separated namespace is it will make it easier to cleanup resources deployed by the testing.
|
// The reason why we need a separated namespace is it will make it easier to cleanup resources deployed by the testing.
|
||||||
|
|
|
@ -22,8 +22,8 @@ func TestIntegration(t *testing.T) {
|
||||||
|
|
||||||
var _ = ginkgo.BeforeSuite(func() {
|
var _ = ginkgo.BeforeSuite(func() {
|
||||||
// suite set up, such as get karmada environment ready.
|
// suite set up, such as get karmada environment ready.
|
||||||
}, TestSuiteSetupTimeOut.Seconds())
|
})
|
||||||
|
|
||||||
var _ = ginkgo.AfterSuite(func() {
|
var _ = ginkgo.AfterSuite(func() {
|
||||||
// suite tear down, such as cleanup karmada environment.
|
// suite tear down, such as cleanup karmada environment.
|
||||||
}, TestSuiteTeardownTimeOut.Seconds())
|
})
|
||||||
|
|
Loading…
Reference in New Issue