-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
No test framework #778
No test framework #778
Conversation
/retest |
9ef9336
to
8bd9aa3
Compare
Hm weird errror
/retest |
8bd9aa3
to
2b57d3e
Compare
Ah okay, I wasn't handling the docker repo argument correctly. |
2b57d3e
to
656b69b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial review...
test/README.md
Outdated
* Provide a docker repo from which the built images wil be pulled. This is done | ||
via the `--dockerrepo` argument. | ||
|
||
_The `bazel` execution environment will not contain your enviornment variables, so you must |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: environment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, type wil->will
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😅
test/README.md
Outdated
|
||
To run the conformance tests with `bazel` you must: | ||
|
||
* Provide a `kubeconfig` file that is a `data` dependency of the test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't there a period after "test"? I read this sentence 3 times and although I understand it technically, the wording sounds confusing to me...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Period makes it clearer! I'll also break this into a couple of sentences to try to make it easier to understand.
test/README.md
Outdated
|
||
The end-to-end tests can be run by executing `e2e-tests.sh --run-tests` in the command line. | ||
These flags useful for running against an existing cluster, making use of your existing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"flags are useful"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😅
test/README.md
Outdated
To run the conformance tests with a non-default kubeconfig file: | ||
|
||
```bash | ||
go test ./test/conformance -args --kubeconfig /my/path/kubeconfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why "-args" here, but not in the examples before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah thanks for catching this - when i realized the dockerrepo arg wasn't working a i got confused and thought I needed to provide -args
before passing test arguments, but apparently -args
does something completely different than I thought it did:
To keep an argument for a test binary from being interpreted as a
known flag or a package name, use -args (see 'go help test') which
passes the remainder of the command line through to the test binary
uninterpreted and unaltered.
Will remove -args
from the docs!
test/README.md
Outdated
if not specified. | ||
|
||
```bash | ||
go test ./test/conformance -args --cluster your-cluster-name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why "-args" here, but not in the examples before?
test/README.md
Outdated
go test ./test/conformance -args --cluster your-cluster-name | ||
``` | ||
|
||
The current cluster names can be obtained by runing: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: running
test/README.md
Outdated
if not specified. | ||
|
||
```bash | ||
go test ./test/conformance -args --dockerrepo gcr.myhappyproject |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why "-args" here, but not in the examples before?
@nikkithurmond Christie's library should make it easier rewriting the autoscaler tests in go. 😄 |
As explored in the prototypes in #253, we have decided that although Ginkgo is the best of the Go test frameworks, we do not want to be tied to BDD and feel these tests will be cleaner and easier to contribute to if we use no framework. I have also refactored the supporting logic of the tests into a `test` library which can be reused for other e2e tests, documented in test/adding_tests.md * Improved docs on running tests: now all docs on running are in test/README.md, there is only one place to look to see how to run all of the tests. Instructions on how to run conformance tests are hopefully more clear. * Updated links that pointed at CONTRIBUTING.md since the content moved Fixes #253
Removed ginkgo + gomega.
656b69b
to
0391432
Compare
@adrcunha initial issues should be addressed now! |
Suggestion: move the library to its own subdirectory inside test. |
As discussed earlier, let's merge this PR so Nicole can make use of the library for the autoscaler E2E tests in go; feedback can be addressed in a future PR. |
/lgtm |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: adrcunha, bobcatfish Assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I like this idea and I think the But on the other hand I think it makes sense that the package is called |
I need a |
framework? Or we could have //test/e2e for the tests themselves, and //test/e2e/framework for the framework? (or //test/e2e/lib) |
One thing I like about the current libs are that they are just libs, and not yet a framework (i.e. they don't require anything about what is called when, or what the entry point is, things a framework would be very prescriptive about).
I could go with lib if we can't think of anything better - I feel like Packages named util, common, or misc provide clients with no sense of what the package contains. This makes it harder for clients to use the package and makes it harder for maintainers to keep the package focused. But maybe in the context of the
I like that! I think it makes sense to have an |
@vaikas-google @mattmoor and @evankanderson I'm going to cheat and merge this without tide b/c I think you may be traveling and so @nikkithurmond and others can make use of / react to the changes. If you notice anything you want changed tho plz point it out and I'll open another PR. |
…1428) In #475 I removed assertions against Configuration.Spec.Generation b/c it is a hack and not part of the knative spec. In #600 I updated the conformance tests to assert against the Revision annotation which contains the generation. BUT THEN in #778 when I completely re-wrote the tests to no longer use Ginkgo, I accidentally undid both of those changes, so this commit puts them back 😅. BONUS: I hit a case where the length of the loadbalancer ingresses was 0 and got a panic, so if that happens again we'll get an informative error instead.
As explored in the prototypes in #253, we have decided that although Ginkgo is the best of the Go test frameworks, we do not want to be tied to BDD and feel these tests will be cleaner and easier to contribute to if we use no framework.
I have also refactored the supporting logic of the tests into a
test
library which can be reused for other e2e tests, documented in test/adding_tests.mdFixes #253
Proposed Changes
Release Note
There are two commits, one to make the changes and the other to update deps, etc.
😎
This is what the conformance tests look like when they run: