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
Initial docs about writing extended test #4258
Conversation
|
||
The structure of this directory is following: | ||
|
||
* **`test/extended/util`** provides useful helpers and utilities to use in your extended test. It provides a easy-to-use interface to OpenShift CLI and also |
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.
link to the dir?
[**`test/extended/util`**](../test/extended/util)
Add some information and a link to this README after this section here. |
------------------ | ||
|
||
In order to execute the extended tests, you have to install | ||
[Ginkgo](https://github.com/onsi/ginkgo) framework which is used in extended |
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.
Add the how-to:
go get github.com/onsi/ginkgo/ginkgo
@mfojtik I've added the CLI interface part. PTAL |
@stevekuznetsov thanks! I moved the docs into README.md |
The structure of this directory is following: | ||
|
||
* [**`test/extended/util`**](util) provides useful helpers and utilities to use in your extended test. It provides a easy-to-use interface to OpenShift CLI and also | ||
access to the Kubernetes [E2E framework](https://github.com/openshift/origin/tree/master/Godeps/_workspace/src/k8s.io/kubernetes/test/e2e) helpers. It also contains OpenShift helpers are shared across multiple test cases, to make the test cases more DRY. |
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.
s/OpenShift helpers are/OpenShift helpers that are/
@mfojtik this looks like a good start, one thing i'd add is an explanation of how the whole flow works, ie starting with the test-extend.sh script, what parameters that takes to decide what to run, etc. |
We may want to have a ref to the common bash functions in hack/util.sh Thoughts @bparees @mfojtik @jhadvig ? On Fri, Aug 21, 2015 at 1:13 PM, Ben Parees notifications@github.com
|
@gabemontero +1 |
one more thing to add: how to run a specific test within a group, assuming that's possible... |
@bparees @gabemontero thanks! I going to add all docs you mention |
@mfojtik is there a way to run a single test (single .go file or single Describe within it?) or is "group" the finest level of granularity? |
|
||
In order to make the test runner shell scripts more DRY, we bundled common | ||
functions into a Bash helpers you can run instead of copy&pasting the code from | ||
other launchers. |
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.
name the file where this is bundled.
Only had 4 minor typo kind of corrections on top of the @bparees comment about listing the location of the base helpers.... pending further input from others, igtm |
@bparees The run scripts for extended tests are currently changing - they will soon have the following syntax: |
having just written my first extended test (yay!), a couple things i found confusing related to buckets/focuses... we have scripts like: which runs ginkgo with the "forcepull" focus but then forcepull.go is located under "test/extended/builds/forcepull.go" and then everything else under "builds" is under the "default" focus. If i wanted to figure out what "hack/test-extended/forcepull/run.sh" was going to run, i'd have intuitively looked for "test/extended/forcepull/somefiles.go" it seems like a bit of a mish-mash. intuitively i'd expect that tests with the same "focus" would live in the same directory and there would be some script i could run (or argument to a script) which would run all the tests in that directory. (again ideally i'd be able to pick a specific test from a specific directory, too) @stevekuznetsov what defines a "bucket" in this impending refactor? perhaps that will make it more like what i was thinking... |
Yeah I originally had a separate forcepull subdir but then switched based on comment from @mfojtik. Forcepull is still build related (hence same dir) but needs to run separately (hence a different focus). Admittedly without understanding that distinction it seems confusing. I ultimately don't feel strongly either way, but did like the idea of exposing forcepull at the subdir / group level. Gabe
|
@bparees @gabemontero right, it is a little bit confusing, but I don't want to introduce a lot of extra Go packages for different test groups. Especially when the tests really are 'builds' test or 'images' tests. I think one solution could be to use |
@mfojtik if the only alternative is a lot of go packages, i agree, just wanted to raise the discussion if only to ensure it gets documented clearly. |
[merge] We will improve these docs as we go. |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/3119/) (Image: devenv-fedora_2222) |
[Test]ing while waiting on the merge queue |
continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/4480/) |
Evaluated for origin test up to ebffbc9 |
@bparees The original intent of the buckets (as per @deads2k) was functional separation - don't start up a cluster with a router if there is no router necessary for it. Thinking more about it, however, as these are extended tests we don't particularly need them to be isolated, we care if they fail when the router is up even if they don't run the router. It would make sense to only have buckets if they have some sort of conflicting setup needs for the cluster, which I am not sure we have right now. |
i'm not sure if buckets and focus are two separate ways of grouping things but basically there are two needs here: 1a) defining the configuration a particular set of tests need. this would include "tests that don't need a router" (though i don't see the point in grouping that separately...if you don't need a router, don't use it..don't start a whole separate openshift server w/o a router for that purpose...but perhaps there's a more legitimate use case here). 1b) tests which need to be run serially, not in parallel (the forcepull test which mucks with the images on the host filesystem and therefore could screw up other tests running at the same time is an example of this)
So whatever we're driving at, i'd expect it to provide those 2.5 levels of division. And it should be easy for a user to at least understand how to run buckets grouped by (2). As a user it's probably not as important I be able to run "all the tests that don't need a router" or "all the tests that can't be run in parallel". so if we're already there, great..if not, let's figure out how to restructure things so we can get those characteristics. And if we can do it in such a way that the directory structure/scripts make more logical sense, even better :) |
I only care about functional area. Ben's item 2. I see the parallel/serial and configuration as the responsibility of the individual bucket owner. Maybe interesting, but not essential or particularly useful in all cases. I'd like to see the bash for startup behave similarly to the integration tests where we make a config that is easy to mutate and then start it. That should help dry out the scripts and reduce pain without making painful, prescriptive metadata that doesn't really help reduce overall complexity. |
re [merge] |
Evaluated for origin merge up to ebffbc9 |
Merged by openshift-bot
(this is just a draft ;-)
TODO
oc.Run()
)