-
Notifications
You must be signed in to change notification settings - Fork 112
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
Initialize testContext before enumerating tests #2229
base: master
Are you sure you want to change the base?
Conversation
@jsafrane: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
Comment |
testContext must be populated before *enumerating* e2e tests, it's too late to populate it before running tests.
@jsafrane: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
Comment |
/payload 4.19 nightly blocking |
@stbenjam: trigger 12 job(s) of type blocking for the nightly release of OCP 4.19
See details on https://pr-payload-tests.ci.openshift.org/runs/ci/47156eb0-f84a-11ef-9675-1223fd652ffd-0 |
@jsafrane: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
Comment |
@jsafrane: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
Comment |
/lgtm |
The error message is better but when I run this locally, you end up getting this:
KUBECONFIG is also sufficient, what this really wants is a way to talk to a cluster. I really dislike these errors. It prevents you from even being able to run help before providing configuration. |
In general, provide better error messages and don't use panic().
@jsafrane: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
Comment |
I updated the error messages overall:
|
/lgtm |
/payload abort |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jsafrane, stbenjam The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/payload-abort |
testContext must be populated before enumerating e2e tests, it's too late to populate it before running them.
At least upstream
e2e.test
does so and my Kubernets 1.33 test (= future 4.20) counts with that. It uses theTestContext.NodeOSDistro
inginkgo.Context()
here.k8s-tests
already did this, justk8s-tests-ext
is different now.Improve overall error handling in k8s-test-ext:
panic()
and print some context around the errors.Examples:
empty KUBECONFIG:
F0303 18:45:40.863889 3264068 k8s-tests.go:63] Failed to initialize Kubernetes client. Is KUBECONFIG set? Full error: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable
KUBECONFIG pointing to a missing file:
F0303 18:47:24.093819 3264652 k8s-tests.go:65] Failed to initialize test framework: stat /home/jsafrane/some/non-existing/file: no such file or directory