-
-
Notifications
You must be signed in to change notification settings - Fork 660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flag provided but not defined: -test.timeout (Go 1.13) #602
Comments
Suspect this is the cause https://golang.org/doc/go1.13#testing
|
Getting the same issue after upgrade to Go 1.13: ./bin/ginkgo -cover -r ne -- -c /builds/cns/go-app/conf/main.conf -override /builds/cns/go-app//conf/main.override.conf.tpl -override-type template -env test
flag provided but not defined: -test.timeout |
I am having the same bug right now with a |
any update? are you planning to fix that? |
I think this is the test case problem, not the ginkgoproblem. As kubernetes/kubernetes#82742 |
In some cases explicit call for var _ = func() bool {
testing.Init()
return true
}()
func TestApp(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "App / Suite")
} |
As @dfreilich correctly pointed out, the
It occurs when An example how to reproduce this error without using ginkgo can be found here. I agree with @zhubuntu that this is not a Ginkgo issue. |
Looks like it’s a breaking change in Go 1.13. The solution is for users not to call |
I can confirm that replacing func init() {
flag.Parse()
}
TestXYZ(t *testing.T) {} with func TestMain(m *testing.M) {
flag.Parse()
os.Exit(m.Run())
}
TestXYZ(t *testing.T) {} solves the issue. |
I am hitting this error
|
@puppet-py, could you share a little more context about what triggered this. Have you just upgraded something? Have you added some more code? How long is it since things worked without getting this error? Is there an easy way to reproduce it that you can share?
|
@blgm You can refer the last comment here #693 (comment) wrt my findings. @onsi was earlier responding to that issue which I have opened |
before flag.Parse() add testing.Init() |
Hi @zemul. Could you say a bit more about the issue that you're having? |
I am running into the same issue. I am using go 1.13 for the build environment. I added I am using Any suggestions? |
@patelpayal, there is a suggested approach here: #602 (comment) |
I've encountered this error log while using branch v2: steps:
go version ps: the case run perfectly with master branch |
hey thanks for giving V2 a try. can you confirm that you recompiled the |
When trying to run the apt-buildpack integration tests on a computer running Go 1.13, we were unable to and got the following error:
Our integration test script:
Env:
The text was updated successfully, but these errors were encountered: