[RESOLVED] flag redefined: ginkgo.seed
when implementing tests for Webhook
or Controller
for the Core Types
#3049
-
Traceback❯ go test ./... -v
/var/folders/qx/2ky7rt7j7mz_jxmrpjvc40hndh1zjd/T/go-build918891453/b001/controllers.test flag redefined: ginkgo.seed
panic: /var/folders/qx/2ky7rt7j7mz_jxmrpjvc40hndh1zjd/T/go-build918891453/b001/controllers.test flag redefined: ginkgo.seed
goroutine 1 [running]:
flag.(*FlagSet).Var(0xc000124120, {0x250bc50, 0x3092b40}, {0xc0003920c0, 0xb}, {0x22f1895, 0x2a})
/Users/s.thakkar/.goenv/versions/1.19.0/src/flag/flag.go:980 +0x2f9
flag.(*FlagSet).Int64Var(...)
/Users/s.thakkar/.goenv/versions/1.19.0/src/flag/flag.go:767
github.com/onsi/ginkgo/v2/types.bindFlagSet({{0xc00064b500, 0x20, 0x21}, {0x21025a0, 0xc0001e6900}, {0x3064100, 0xd, 0xd}, {{0x0, 0x0}, ...}, ...}, ...)
/Users/s.thakkar/go/1.19.0/pkg/mod/github.com/onsi/ginkgo/[email protected]/types/flags.go:161 +0x709
github.com/onsi/ginkgo/v2/types.NewAttachedGinkgoFlagSet(...)
/Users/s.thakkar/go/1.19.0/pkg/mod/github.com/onsi/ginkgo/[email protected]/types/flags.go:113
github.com/onsi/ginkgo/v2/types.BuildTestSuiteFlagSet(0x3092b40, 0x3092260)
/Users/s.thakkar/go/1.19.0/pkg/mod/github.com/onsi/ginkgo/[email protected]/types/config.go:346 +0x5d8
github.com/onsi/ginkgo/v2.init.0()
/Users/s.thakkar/go/1.19.0/pkg/mod/github.com/onsi/ginkgo/[email protected]/core_dsl.go:47 +0x66
FAIL github.com/deliveryhero/pd-pre-flight-checks/controllers 0.439s
FAIL
|
Beta Was this translation helpful? Give feedback.
Answered by
smitthakkar96
Oct 26, 2022
Replies: 2 comments
-
I found the solution, by accident, in some |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
smitthakkar96
-
Closing since it is answered. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I found the solution, by accident, in some
_test.go
files I was importingi.8713187.xyz/onsi/ginkgo
instead ofi.8713187.xyz/onsi/ginkgo/v2
. The error message ginkgo produced was super unhelpful; however I can understand that such scenarios cannot be covered by error handling.