You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@yunikorn.apache.org by cc...@apache.org on 2024/01/17 17:00:10 UTC
(yunikorn-k8shim) branch master updated: [YUNIKORN-2330] [e2e] Ensure all e2e test suites upload test artifacts (#766)
This is an automated email from the ASF dual-hosted git repository.
ccondit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yunikorn-k8shim.git
The following commit(s) were added to refs/heads/master by this push:
new 3c78e593 [YUNIKORN-2330] [e2e] Ensure all e2e test suites upload test artifacts (#766)
3c78e593 is described below
commit 3c78e593ef32a715e8cd81666ca058690d4e71cc
Author: Peter Bacsko <pb...@cloudera.com>
AuthorDate: Wed Jan 17 10:59:38 2024 -0600
[YUNIKORN-2330] [e2e] Ensure all e2e test suites upload test artifacts (#766)
Closes: #766
Signed-off-by: Craig Condit <cc...@apache.org>
---
test/e2e/configmap/configmap_suite_test.go | 6 +++++-
test/e2e/configmap/configmap_test.go | 2 ++
test/e2e/persistent_volume/persistent_volume_test.go | 12 +++++++-----
test/e2e/recovery_and_restart/recovery_and_restart_test.go | 5 +++++
4 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/test/e2e/configmap/configmap_suite_test.go b/test/e2e/configmap/configmap_suite_test.go
index 5257bfa6..8224999a 100644
--- a/test/e2e/configmap/configmap_suite_test.go
+++ b/test/e2e/configmap/configmap_suite_test.go
@@ -20,6 +20,7 @@ package configmap
import (
"path/filepath"
+ "runtime"
"testing"
"github.com/onsi/ginkgo/v2"
@@ -32,6 +33,8 @@ import (
"github.com/apache/yunikorn-k8shim/test/e2e/framework/helpers/yunikorn"
)
+var suiteName string
+
func init() {
configmanager.YuniKornTestConfig.ParseFlags()
}
@@ -57,7 +60,8 @@ var (
)
var _ = BeforeSuite(func() {
-
+ _, filename, _, _ := runtime.Caller(0)
+ suiteName = common.GetSuiteName(filename)
kClient = k8s.KubeCtl{}
Ω(kClient.SetClient()).To(BeNil())
diff --git a/test/e2e/configmap/configmap_test.go b/test/e2e/configmap/configmap_test.go
index 49aa2120..658c537d 100644
--- a/test/e2e/configmap/configmap_test.go
+++ b/test/e2e/configmap/configmap_test.go
@@ -27,6 +27,7 @@ import (
v1 "k8s.io/api/core/v1"
"github.com/apache/yunikorn-core/pkg/common/configs"
+ tests "github.com/apache/yunikorn-k8shim/test/e2e"
"github.com/apache/yunikorn-k8shim/test/e2e/framework/configmanager"
"github.com/apache/yunikorn-k8shim/test/e2e/framework/helpers/k8s"
"github.com/apache/yunikorn-k8shim/test/e2e/framework/helpers/yunikorn"
@@ -100,6 +101,7 @@ var _ = Describe("ConfigMap", func() {
})
AfterEach(func() {
+ tests.DumpClusterInfoIfSpecFailed(suiteName, []string{"default"})
yunikorn.RestoreConfigMapWrapper(oldConfigMap, "")
})
})
diff --git a/test/e2e/persistent_volume/persistent_volume_test.go b/test/e2e/persistent_volume/persistent_volume_test.go
index f131dc89..8957d29d 100644
--- a/test/e2e/persistent_volume/persistent_volume_test.go
+++ b/test/e2e/persistent_volume/persistent_volume_test.go
@@ -22,18 +22,16 @@ import (
"runtime"
"time"
+ "github.com/onsi/ginkgo/v2"
"github.com/onsi/gomega"
-
- "k8s.io/apimachinery/pkg/api/resource"
-
appsv1 "k8s.io/api/apps/v1"
v1 "k8s.io/api/core/v1"
rbacv1 "k8s.io/api/rbac/v1"
storagev1 "k8s.io/api/storage/v1"
+ "k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "github.com/onsi/ginkgo/v2"
-
+ tests "github.com/apache/yunikorn-k8shim/test/e2e"
"github.com/apache/yunikorn-k8shim/test/e2e/framework/helpers/common"
"github.com/apache/yunikorn-k8shim/test/e2e/framework/helpers/k8s"
"github.com/apache/yunikorn-k8shim/test/e2e/framework/helpers/yunikorn"
@@ -181,6 +179,10 @@ var _ = ginkgo.Describe("PersistentVolume", func() {
deleteNfsRelatedRoles(saName, crName, crbName)
deleteNfsProvisioner(serverName, scName)
})
+
+ ginkgo.AfterEach(func() {
+ tests.DumpClusterInfoIfSpecFailed(suiteName, []string{"default"})
+ })
})
func createNfsRbac(svaName string, crName string, crbName string) {
diff --git a/test/e2e/recovery_and_restart/recovery_and_restart_test.go b/test/e2e/recovery_and_restart/recovery_and_restart_test.go
index ad46323b..8257d85d 100644
--- a/test/e2e/recovery_and_restart/recovery_and_restart_test.go
+++ b/test/e2e/recovery_and_restart/recovery_and_restart_test.go
@@ -29,6 +29,7 @@ import (
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
+ tests "github.com/apache/yunikorn-k8shim/test/e2e"
"github.com/apache/yunikorn-k8shim/test/e2e/framework/configmanager"
"github.com/apache/yunikorn-k8shim/test/e2e/framework/helpers/common"
"github.com/apache/yunikorn-k8shim/test/e2e/framework/helpers/k8s"
@@ -364,6 +365,10 @@ var _ = ginkgo.Describe("", func() {
err = kClient.WaitForJobPodsSucceeded(dev, job.Name, 1, 60*time.Second)
Ω(err).NotTo(gomega.HaveOccurred())
})
+
+ ginkgo.AfterEach(func() {
+ tests.DumpClusterInfoIfSpecFailed(suiteName, []string{dev})
+ })
})
func getSchedulerPodTolerations(includeMaster bool) []v1.Toleration {
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: issues-help@yunikorn.apache.org