Skip to content

Commit e9c2092

Browse files
authored
Merge pull request #1520 from splunk/CSPL-3759-ginkgo-upgrade
Ginkgo upgrade
2 parents 9e9b018 + 2547df6 commit e9c2092

39 files changed

+78
-39
lines changed

test/appframework_aws/c3/appframework_aws_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
enterpriseApi "github.com/splunk/splunk-operator/api/v4"
2626

2727
. "github.com/onsi/ginkgo/v2"
28+
"github.com/onsi/ginkgo/v2/types"
2829
. "github.com/onsi/gomega"
2930

3031
splcommon "github.com/splunk/splunk-operator/pkg/splunk/common"
@@ -64,7 +65,7 @@ var _ = Describe("c3appfw test", func() {
6465

6566
AfterEach(func() {
6667
// When a test spec failed, skip the teardown so we can troubleshoot.
67-
if CurrentGinkgoTestDescription().Failed {
68+
if types.SpecState(CurrentSpecReport().State) == types.SpecStateFailed {
6869
testcaseEnvInst.SkipTeardown = true
6970
}
7071
if deployment != nil {

test/appframework_aws/c3/manager_appframework_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
"time"
2323

2424
. "github.com/onsi/ginkgo/v2"
25+
"github.com/onsi/ginkgo/v2/types"
2526
. "github.com/onsi/gomega"
2627

2728
enterpriseApi "github.com/splunk/splunk-operator/api/v4"
@@ -61,7 +62,7 @@ var _ = Describe("c3appfw test", func() {
6162

6263
AfterEach(func() {
6364
// When a test spec failed, skip the teardown so we can troubleshoot.
64-
if CurrentGinkgoTestDescription().Failed {
65+
if types.SpecState(CurrentSpecReport().State) == types.SpecStateFailed {
6566
testcaseEnvInst.SkipTeardown = true
6667
}
6768
if deployment != nil {

test/appframework_aws/m4/appframework_aws_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
"time"
2323

2424
. "github.com/onsi/ginkgo/v2"
25+
"github.com/onsi/ginkgo/v2/types"
2526
. "github.com/onsi/gomega"
2627

2728
enterpriseApiV3 "github.com/splunk/splunk-operator/api/v3"
@@ -66,7 +67,7 @@ var _ = Describe("m4appfw test", func() {
6667

6768
AfterEach(func() {
6869
// When a test spec failed, skip the teardown so we can troubleshoot.
69-
if CurrentGinkgoTestDescription().Failed {
70+
if types.SpecState(CurrentSpecReport().State) == types.SpecStateFailed {
7071
testcaseEnvInst.SkipTeardown = true
7172
}
7273
if deployment != nil {

test/appframework_aws/m4/manager_appframework_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
"time"
2323

2424
. "github.com/onsi/ginkgo/v2"
25+
"github.com/onsi/ginkgo/v2/types"
2526
. "github.com/onsi/gomega"
2627

2728
enterpriseApi "github.com/splunk/splunk-operator/api/v4"
@@ -65,7 +66,7 @@ var _ = Describe("m4appfw test", func() {
6566

6667
AfterEach(func() {
6768
// When a test spec failed, skip the teardown so we can troubleshoot.
68-
if CurrentGinkgoTestDescription().Failed {
69+
if types.SpecState(CurrentSpecReport().State) == types.SpecStateFailed {
6970
testcaseEnvInst.SkipTeardown = true
7071
}
7172
if deployment != nil {

test/appframework_aws/s1/appframework_aws_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
enterpriseApi "github.com/splunk/splunk-operator/api/v4"
2424

2525
. "github.com/onsi/ginkgo/v2"
26+
"github.com/onsi/ginkgo/v2/types"
2627
. "github.com/onsi/gomega"
2728

2829
splcommon "github.com/splunk/splunk-operator/pkg/splunk/common"
@@ -56,7 +57,7 @@ var _ = Describe("s1appfw test", func() {
5657

5758
AfterEach(func() {
5859
// When a test spec failed, skip the teardown so we can troubleshoot.
59-
if CurrentGinkgoTestDescription().Failed {
60+
if types.SpecState(CurrentSpecReport().State) == types.SpecStateFailed {
6061
testcaseEnvInst.SkipTeardown = true
6162
}
6263
if deployment != nil {

test/appframework_az/c3/appframework_azure_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
"time"
2323

2424
. "github.com/onsi/ginkgo/v2"
25+
"github.com/onsi/ginkgo/v2/types"
2526
. "github.com/onsi/gomega"
2627
enterpriseApiV3 "github.com/splunk/splunk-operator/api/v3"
2728
enterpriseApi "github.com/splunk/splunk-operator/api/v4"
@@ -58,7 +59,7 @@ var _ = Describe("c3appfw test", func() {
5859

5960
AfterEach(func() {
6061
// When a test spec failed, skip the teardown so we can troubleshoot.
61-
if CurrentGinkgoTestDescription().Failed {
62+
if types.SpecState(CurrentSpecReport().State) == types.SpecStateFailed {
6263
testcaseEnvInst.SkipTeardown = true
6364
}
6465
if deployment != nil {

test/appframework_az/c3/manager_appframework_azure_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
"time"
2323

2424
. "github.com/onsi/ginkgo/v2"
25+
"github.com/onsi/ginkgo/v2/types"
2526
. "github.com/onsi/gomega"
2627
enterpriseApi "github.com/splunk/splunk-operator/api/v4"
2728
splcommon "github.com/splunk/splunk-operator/pkg/splunk/common"
@@ -57,7 +58,7 @@ var _ = Describe("c3appfw test", func() {
5758

5859
AfterEach(func() {
5960
// When a test spec failed, skip the teardown so we can troubleshoot.
60-
if CurrentGinkgoTestDescription().Failed {
61+
if types.SpecState(CurrentSpecReport().State) == types.SpecStateFailed {
6162
testcaseEnvInst.SkipTeardown = true
6263
}
6364
if deployment != nil {

test/appframework_az/m4/appframework_azure_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
"time"
2323

2424
. "github.com/onsi/ginkgo/v2"
25+
"github.com/onsi/ginkgo/v2/types"
2526
. "github.com/onsi/gomega"
2627

2728
enterpriseApiV3 "github.com/splunk/splunk-operator/api/v3"
@@ -65,7 +66,7 @@ var _ = Describe("m4appfw test", func() {
6566

6667
AfterEach(func() {
6768
// When a test spec failed, skip the teardown so we can troubleshoot.
68-
if CurrentGinkgoTestDescription().Failed {
69+
if types.SpecState(CurrentSpecReport().State) == types.SpecStateFailed {
6970
testcaseEnvInst.SkipTeardown = true
7071
}
7172
if deployment != nil {

test/appframework_az/m4/manager_appframework_azure_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
"time"
2323

2424
. "github.com/onsi/ginkgo/v2"
25+
"github.com/onsi/ginkgo/v2/types"
2526
. "github.com/onsi/gomega"
2627

2728
enterpriseApi "github.com/splunk/splunk-operator/api/v4"
@@ -64,7 +65,7 @@ var _ = Describe("m4appfw test", func() {
6465

6566
AfterEach(func() {
6667
// When a test spec failed, skip the teardown so we can troubleshoot.
67-
if CurrentGinkgoTestDescription().Failed {
68+
if types.SpecState(CurrentSpecReport().State) == types.SpecStateFailed {
6869
testcaseEnvInst.SkipTeardown = true
6970
}
7071
if deployment != nil {

test/appframework_az/s1/appframework_azure_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"strings"
2121

2222
. "github.com/onsi/ginkgo/v2"
23+
"github.com/onsi/ginkgo/v2/types"
2324
. "github.com/onsi/gomega"
2425

2526
enterpriseApi "github.com/splunk/splunk-operator/api/v4"
@@ -53,7 +54,7 @@ var _ = Describe("s1appfw test", func() {
5354

5455
AfterEach(func() {
5556
// When a test spec failed, skip the teardown so we can troubleshoot.
56-
if CurrentGinkgoTestDescription().Failed {
57+
if types.SpecState(CurrentSpecReport().State) == types.SpecStateFailed {
5758
testcaseEnvInst.SkipTeardown = true
5859
}
5960
if deployment != nil {

0 commit comments

Comments
 (0)