Skip to content

Commit cdae605

Browse files
committed
Update
1 parent 316fd95 commit cdae605

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -895,10 +895,7 @@ func outputPodLog(podSubstring string) {
895895
// Output only the last 1000 lines
896896
lines := strings.Split(kubectlLogOutput, "\n")
897897

898-
startIndex := len(lines) - 1000
899-
if startIndex < 0 {
900-
startIndex = 0
901-
}
898+
startIndex := max(len(lines)-1000, 0)
902899

903900
GinkgoWriter.Println("")
904901
GinkgoWriter.Println("----------------------------------------------------------------")

test/openshift/e2e/ginkgo/sequential/1-003_validate_cluster_config_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() {
5959
ns, cleanupFunc := fixture.CreateNamespaceWithCleanupFunc("argocd-e2e-cluster-config")
6060
defer cleanupFunc()
6161

62+
defer fixture.OutputDebugOnFail("argocd-e2e-cluster-config", "openshift-gitops")
63+
6264
By("creating simple namespace-scoped ArgoCD instance .spec.initialSSHKnownHosts set")
6365
argoCD := &argov1beta1api.ArgoCD{
6466
ObjectMeta: metav1.ObjectMeta{Name: "example-argocd", Namespace: ns.Name},
@@ -76,6 +78,7 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() {
7678
fixture.SetEnvInOperatorSubscriptionOrDeployment("ARGOCD_CLUSTER_CONFIG_NAMESPACES", "openshift-gitops, argocd-e2e-cluster-config")
7779

7880
defer fixture.RestoreSubcriptionToDefault() // revert Subscription at end of test
81+
defer fixture.OutputDebugOnFail("argocd-e2e-cluster-config", "openshift-gitops")
7982

8083
By("verifying ClusterRole/Binding were created for argocd-e2e-cluster-config server/app controller components, now that the namespace is specified in the CLUSTER_CONFIG env var")
8184
appControllerCR := &rbacv1.ClusterRole{ObjectMeta: metav1.ObjectMeta{Name: "example-argocd-argocd-e2e-cluster-config-argocd-application-controller"}}

0 commit comments

Comments
 (0)