Skip to content
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

E2E tests: Should not run if ginko testContext is unavailable. #6552

Closed
jayunit100 opened this issue Apr 8, 2015 · 9 comments
Closed

E2E tests: Should not run if ginko testContext is unavailable. #6552

jayunit100 opened this issue Apr 8, 2015 · 9 comments
Assignees
Labels
area/test-infra priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@jayunit100
Copy link
Member

@zmerlynn @quinton-hoole @wojtek-t

Looks like when you run tests via ginko, from source, the parameters are not injected...

 go run ./cmd/e2e/e2e.go --provider=local --namespace=default --host=http://127.0.0.1:8081 -t "Networking" --auth_config=/opt/kube-creds  

Maybe its only valid to run using some kind of ginko ... invocation, or else via binarys?

Given that this variability exists, it would be good to validate that the parameters are indeed injected before running tests.

To be honest, im not even sure how textContext is populated...

@vishh vishh added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. area/test-infra labels Apr 8, 2015
@vishh vishh assigned ghost Apr 8, 2015
@ghost
Copy link

ghost commented Apr 8, 2015

Agreed, this stuff seems busted. We have a plan to get rid of the custom wrapper around our e2e tests and replace it with the standard Ginkgo runner real soon now. Lets handle this one in the context of that. I'll find (or open) an issue for the former, and touch base with @zmerlynn and @ixdy today to get this moving. Are you interested in contributing @jayunit100?

@ixdy
Copy link
Member

ixdy commented Apr 13, 2015

Right now I think the preferred way to run e2e tests is using go run hack/e2e.go --test, which itself calls hack/ginkgo-e2e.sh, which actually does the work of setting all of the necessary arguments to pass to cmd/e2e/e2e.go.

We should probably get rid of these intermediate steps (which is the goal of #5670), though each of these scripts and wrappers does provide some necessary functionality currently.

@ghost
Copy link

ghost commented Apr 15, 2015

Reassigning to @ixdy as part of #5670

@ghost ghost assigned ixdy and unassigned ghost Apr 15, 2015
@mbforbes
Copy link
Contributor

I'm running into this as well. I'm running with go run hack/e2e.go --test (and some other stuff) and my tests are panicking when they try to access testContext.Provider. I thought I was crazy because I couldn't see how it was populated. (Well, my tests are still panicking, so maybe I am crazy.)

@mbforbes
Copy link
Contributor

Update: protip: only try to touch testContext while within an It(...) block; it will even panic other tests you haven't touched if you do this. That was a fun afternoon.

@ixdy
Copy link
Member

ixdy commented Apr 24, 2015

You can also use testContext from a BeforeEach. It seems that using it inside a Describe is not safe, however, as these blocks are evaluated before flags are evaluated. In my work to get rid of cmd/e2e I've found several places that use testContext.RepoRoot before it's initialized as well.

@jayunit100
Copy link
Member Author

Arg ! got burnt by this again :) ^. hope we can come up with a smarter way to avoid running into this issue.

@ghost ghost added this to the v1.0-post milestone Jun 15, 2015
@bgrant0607 bgrant0607 removed this from the v1.0-post milestone Jul 24, 2015
@ikehz ikehz added priority/backlog Higher priority than priority/awaiting-more-evidence. and removed priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Dec 3, 2015
@fejta fejta assigned fejta and unassigned ixdy Mar 7, 2016
@fejta
Copy link
Contributor

fejta commented Mar 7, 2016

Please use go run hack/e2e.go as per https://github.com/kubernetes/kubernetes/blob/master/docs/devel/e2e-tests.md

(I'm assuming this ancient bug is out of date)

@fejta fejta closed this as completed Mar 7, 2016
@jayunit100
Copy link
Member Author

Yeah It's closed. Also the binary itself works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/test-infra priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

No branches or pull requests

7 participants