Skip to content

Commit e8136b0

Browse files
committed
Update
1 parent 2fde1d5 commit e8136b0

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

test/e2e/argocd_metrics_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import (
2727
. "github.com/onsi/ginkgo/v2"
2828
. "github.com/onsi/gomega"
2929
monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
30+
"github.com/redhat-developer/gitops-operator/test/openshift/e2e/ginkgo/fixture"
3031
argocdFixture "github.com/redhat-developer/gitops-operator/test/openshift/e2e/ginkgo/fixture/argocd"
3132
rbacv1 "k8s.io/api/rbac/v1"
3233

@@ -60,6 +61,8 @@ var _ = Describe("Argo CD metrics controller", func() {
6061
Context("Check if monitoring resources are created", func() {
6162
It("Role is created", func() {
6263

64+
defer fixture.OutputDebugOnFail("openshift-gitops", "openshift-gitops-operator")
65+
6366
openShiftGitOpsArgoCD := &argov1beta1api.ArgoCD{
6467
ObjectMeta: metav1.ObjectMeta{Name: "openshift-gitops", Namespace: "openshift-gitops"},
6568
}

test/openshift/e2e/ginkgo/fixture/fixture.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -831,12 +831,14 @@ func OutputDebugOnFail(namespaces ...string) {
831831
isOutputted: true,
832832
}
833833

834+
outputPodLog("openshift-gitops-operator-controller-manager")
835+
834836
for _, namespace := range namespaces {
835837

836838
kubectlOutput, err := osFixture.ExecCommandWithOutputParam(false, "kubectl", "get", "all", "-n", namespace)
837839
if err != nil {
838840
GinkgoWriter.Println("unable to extract operator logs for namespace", namespace, err, kubectlOutput)
839-
return
841+
continue
840842
}
841843

842844
GinkgoWriter.Println("")
@@ -847,7 +849,6 @@ func OutputDebugOnFail(namespaces ...string) {
847849

848850
}
849851

850-
outputPodLog("openshift-gitops-operator-controller-manager")
851852
}
852853

853854
func outputPodLog(podSubstring string) {

test/openshift/e2e/ginkgo/sequential/1-037_validate_applicationset_in_any_namespace_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() {
4949
appset_new_nsNS, cleanupFunc := fixture.CreateNamespaceWithCleanupFunc("appset-new-ns")
5050
defer cleanupFunc()
5151

52+
defer fixture.OutputDebugOnFail(appset_argocdNS.Name, appset_old_nsNS.Name, appset_new_nsNS.Name)
53+
5254
// -----
5355

5456
By("1) create Argo CD instance with no source namespaces")

0 commit comments

Comments
 (0)