Commit Graph

36 Commits (cf39838830fcb0c9eaa397da4a20d88ec43f62ef)

Author SHA1 Message Date
Zach Loafman 2765660101 Revert "Turn the hack/e2e.go commands into standalone scripts." 2015-02-06 14:13:00 -08:00
Filipe Brandenburger 0c7dce77dd Turn the hack/e2e.go commands into standalone scripts.
This gets rid of bashWrap() and of running bash -s passing it a script
on stdin. Also get rid of most of the runBash*() helpers.

In particular, `go run hack/e2e.go -build` will now work when it needs
to ask whether it is OK to download a large docker image, it used to
fail since stdin was not available for the bash script using the `read`
command.

Tested by running a full `hack/e2e-test.sh` run including the build
stage without the docker image loaded, which used to fail before this
change.
2015-02-06 11:18:14 -08:00
Zach Loafman 688f96cd33 Run shell tests under Ginkgo, changing all reporting to JUnit
* Add a test/e2e/shell.go that slurps up everything in hack/e2e-suite
and runs it as a bash test, borrowing all the code from hack/e2e.go.

* Rip out all the crap in hack/e2e.go that deal with multiple tests

* Move hack/e2e-suite/goe2e.sh to hack/ginkgo-e2e.sh so that it
doesn't get slurped up.
2015-02-05 07:24:05 -08:00
Filipe Brandenburger 7bb62cbfb3 Make e2e shell tests work standalone
Simply incorporate some of the boilerplate from hack/e2e.go into the
scripts in hack/e2e-suite.

Use environment variables with default values to allow overrides in
kubectl command line and to use a versioned package root.

Tested:
- Ran `go run hack/e2e.go -test` on a test cluster.
- Ran the test cases individually.
- Ran hack/e2e-suite/goe2e.sh -t Pods to confirm it takes arguments.
- Also fixed cluster/test-network.sh (which should be more and more irrelevant.)
2015-02-05 00:22:16 -08:00
Jeff Lowdermilk 890615d93e Replace kubecfg with kubectl in e2e tests 2015-02-03 11:43:55 -08:00
Brendan Burns 0ad036e0eb Put watch in a loop so that we grab all event logs, even if the watch hangs up. 2015-01-29 09:56:20 -08:00
Joe Beda f3b0f285fa Fix min minions for e2e 2015-01-21 11:37:57 -08:00
Joe Beda c5634e90ba Verify cluster size before e2e 2015-01-20 09:11:29 -08:00
Paul Morie 0c51f9df8d Make e2e -up recreate running clusters; remove kube-up retry 2015-01-18 12:19:07 -05:00
Zach Loafman 0c4119fb07 Revert "Add --v=4 to e2e bash executions by default"
This reverts commit abc621759a, which
interacts weirdly with Jenkins on the GKE provider. Tactical revert
until that can be figured out:

https://github.com/GoogleCloudPlatform/kubernetes/issues/3474
2015-01-14 13:10:45 -08:00
Clayton Coleman abc621759a Add --v=4 to e2e bash executions by default
Will allow more debugging output to be available in CLI
2015-01-14 12:37:40 -05:00
Rohit Jnagal 62ecd5f3ff Fix few vet errors.
There are quite a few 'composite literal uses unkeyed fields' errors that I have kept out of this patch.
And there's a couple where vet just seems confused. These are the easiest ones.
2015-01-07 08:40:16 +00:00
Zach Loafman 9312af4f79 Fix newlines in TAP stdout/stderr output
It turns out, newlines are not "printable", causing the TAP
stderr/stdout output to be smushed. Also address etune's comment on
pr3208.
2015-01-06 08:08:19 -08:00
Zach Loafman d938ecaba2 Escape stdout/stderr YAML-like elements for TAP output
Fixes https://github.com/GoogleCloudPlatform/kubernetes/issues/3094
2015-01-04 08:02:43 -08:00
Zach Loafman 7ee633d186 Fix duration_ms output to seconds (_ms obviously means measure-in-seconds!?) 2014-12-17 10:04:09 -08:00
Zach Loafman c25229937c Add test timing to TAP output in hack/e2e.go
Found this buried at https://issues.jenkins-ci.org/browse/JENKINS-16647
2014-12-16 16:54:45 -08:00
Alex Robinson fe76243b05 Make it easy to use the e2e tests to test upgrading a running master
by adding support for testing official release versions and writing a
simple script to first bring up and test the old version before
upgrading it and testing it again. Related to supporting in-place
upgrades of masters (#2524).
2014-12-15 16:03:11 -08:00
Max Forbes bea37d5b17 Fix up e2e tests. 2014-12-15 11:53:51 -08:00
Zach Loafman 43addc7202 Add Test Anything Protocol (TAP) output to e2e.go
Adds a --tap option to change outputs to match the TAP format. Changes
pass/fail in general to "ok" / "not ok".
2014-12-11 12:20:38 -08:00
Zach Loafman 369064c69f Add --times to e2e.go
Make each test available for execution --times times. Acts like a
multi-deck shoe. (Otherwise this is easily scriptable outside the
e2e.go command).

Useful for "I want to walk away for a few hours leaving some end-to-ends
running", until we have more stress tests. Also useful for detecting
flakes.

Reporting is changed to break out Passed, Flaky and Failed. I chose to
keep all three lines even if --times isn't on, just for consistency in
scraping. Similarly, it always outputs the counts now. A report looks
like:

2014/12/09 07:31:21 Passed tests: goe2e.sh[100/100] guestbook.sh[100/100] private.sh[100/100] services.sh[100/100]
2014/12/09 07:31:21 Flaky tests: basic.sh[99/100] certs.sh[99/100] monitoring.sh[98/100] pd.sh[98/100] update.sh[98/100]
2014/12/09 07:31:21 Failed tests:
2014/12/09 07:31:21 8 test(s) failed.
2014-12-11 12:18:56 -08:00
Zach Loafman b7a7e92ad1 Add --pushup to e2e.go
Silly but hopefully memorable name for an option to --push OR --up
depending on cluster state.
2014-12-08 15:23:30 -08:00
Daniel Smith c5667e1cfe Merge pull request #2782 from zmerlynn/e2e.shuffle
Run e2e tests in deterministic random order
2014-12-08 13:01:32 -08:00
Zach Loafman f3a992aa08 Run e2e tests in deterministic random order
Currently, we run the e2e tests in whatever order readdir happens to
return, which is random on some filesystems, name sorted on others,
create order on others, etc. Eventually, we may want to be
automatically hermetic between e2e tests (especially as we introduce
more resource destructive tests), but until then, it would be useful
if we permute the test order randomly between runs to ensure that
developers don't accidentally rely on a particular order. This
introduces a form of forced hermeticism, since improper state cleanup
from one test may not perturb a given test, but there's probably *a*
test in the suite that the order will perturb, so the RNG will find
that order eventually.

Adds logging of the generated seed, and an --orderseed argument that
can be used to re-run in the same order. Also sorts the pass/fail list
now for easier human reading.
2014-12-08 11:10:39 -08:00
Zach Loafman 3009c88865 Check if cluster is up before e2e test without -up
Minor usability nuisance: If you run:
  go run hack/e2e.go -v -test
.. and you don't happen to have an up e2e cluster, it should fail
fast, rather than chugging through every test and having them fall
over.
2014-12-07 15:35:22 -08:00
Joe Beda 175ca37bc7 trace-bash flag for e2e.go 2014-11-25 15:16:35 -08:00
Daniel Smith c219d138ef make e2e test get events in background, for easier debugging after the fact. 2014-11-13 17:03:06 -08:00
Daniel Smith 4e1ab8045b fix e2e.go args for kubectl 2014-11-12 15:22:09 -08:00
Eric Tune cf21f97cd2 Merge pull request #2309 from lavalamp/fix3
Refactors of kubectl object printers.
2014-11-11 16:39:04 -08:00
Daniel Smith d6d6229fea Actually let hack/e2e.go run kubectl 2014-11-11 15:32:12 -08:00
Haney Maxwell fae27e2f17 Clean up e2e test 2014-11-11 11:03:07 -08:00
Daniel Smith b8aa87ed50 Add handy -cfg and -ctl options to make it easy to run a kubecfg or kubectl command against your e2e cluster. 2014-11-07 16:47:22 -08:00
Joe Beda 5d33ce46cc Rework hack/ and build/ directories.
* Rewrite a bunch of the hack/ directory with modular reusable bash libraries.
* Have 'build/*' build on 'hack/*'.  The stuff in build now just runs hack/* in a docker container.
* Use a docker data container to enable faster incremental builds.
* Standardize output to _output/{local,dockerized}/bin/OS/ARCH/*.  This regularized placement makes cross compilation work.
* Move travis specific scripts under hack/travis

With new dockerized incremental builds, I can do a no-op `make quick-release` in ~30s.  This is a significant improvement.
2014-11-01 17:56:41 -07:00
Daniel Smith 6befc75da5 Build local go components as well as a release 2014-10-28 12:37:03 -07:00
Haney Maxwell d709d8561a Allow e2e tests to run with vagrant 2014-10-24 17:16:10 -07:00
Daniel Smith 47f1cb966b Fixes to e2e script 2014-10-23 14:54:50 -07:00
Daniel Smith bfabb41604 New e2e script (in go this time) that doesn't completely suck 2014-10-23 11:03:30 -07:00