summaryrefslogtreecommitdiff
path: root/hack/make/test-integration-cli
Commit message (Collapse)AuthorAgeFilesLines
* Fixed typo DEREPCATED -> DEPRECATED.Brett Randall2017-12-291-1/+1
| | | | Signed-off-by: Brett Randall <javabrett@gmail.com>
* Cleanup test output, and binaries.Daniel Nephin2017-08-091-1/+3
| | | | Signed-off-by: Daniel Nephin <dnephin@docker.com>
* Remove test-integration-cli and references to it.Daniel Nephin2017-08-091-27/+2
| | | | Signed-off-by: Daniel Nephin <dnephin@docker.com>
* Add go-autogen to integration testsEli Uriegas2017-07-201-0/+1
| | | | | | | | | | Integration test were failing in trial runs for docker-ce 17.07 due to the lack of go-autogen being sourced in `hack/make.sh`. This re-adds go-autogen to be sourced for test-integration-cli so that we can actually run tests without the error found in: https://github.com/moby/moby/pull/33857 Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
* Convert script shebangs from "#!/bin/bash" to "#!/usr/bin/env bash"Tianon Gravi2017-02-131-1/+1
| | | | | | This is especially important for distributions like NixOS where `/bin/bash` doesn't exist, or for MacOS users who've installed a newer version of Bash than the one that comes with their OS. Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
* Support interactive integration testing.Daniel Nephin2016-08-051-4/+1
| | | | | | | Interactive integration testing is useful when you're developing new tests, or making changes to cli code. Signed-off-by: Daniel Nephin <dnephin@docker.com>
* Prevent CI from getting stuck if shims are left aliveKenfe-Mickael Laventure2016-06-281-0/+13
| | | | | | | | | This will kill any left over containerd-shims to avoid the integration script to stay stuck while it waits on them. It will then causes CI to fail (even if all the tests succeeded). Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
* Add support for repeating integration testsTonis Tiigi2016-03-261-1/+1
| | | | | | | `TEST_REPEAT=n` runs the test suite again n times or until the first failure without doing building and daemon setup. Useful for debugging flaky tests. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
* use per-check timeoutsBrian Goff2016-03-111-1/+1
| | | | Signed-off-by: Brian Goff <cpuguy83@gmail.com>
* Remove timer and use -check.v for tests formattingAlexander Morozov2015-06-181-0/+1
| | | | Signed-off-by: Alexander Morozov <lk4d4@docker.com>
* hack: explicit bundles for integration-cli prequisitesJörg Thalheim2015-06-091-5/+3
| | | | | | | | | | | | | | | | | | | no longer load hide critical code such as in .integration-daemon-{start,stop}, if this step failed, it will had logged the corresponding module before: ---> Making bundle: .integration-daemon-start (in bundles/1.7.0-dev/daemon-start) which is nicer to debug. This will make it also easier to execute a single tests in an interactive shell. $ make shell docker> . hack/make.sh binary .integration-daemon-start .integration-daemon-setup docker> docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES docker> go test github.com/docker/docker/integration-cli Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
* Make "DEST" a make.sh construct instead of ad-hocTianon Gravi2015-05-301-2/+0
| | | | | | Using "DEST" for our build artifacts inside individual bundlescripts was already well-established convention, but this officializes it by having `make.sh` itself set the variable and create the directory, also handling CYGWIN oddities in a single central place (instead of letting them spread outward from `hack/make/binary` like was definitely on their roadmap, whether they knew it or not; sneaky oddities). Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
* Fix daemon start/stop logic in hack/make/* scriptsTianon Gravi2015-04-231-14/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From the Bash manual's `set -e` description: (https://www.gnu.org/software/bash/manual/bashref.html#index-set) > Exit immediately if a pipeline (see Pipelines), which may consist of a > single simple command (see Simple Commands), a list (see Lists), or a > compound command (see Compound Commands) returns a non-zero status. > The shell does not exit if the command that fails is part of the > command list immediately following a while or until keyword, part of > the test in an if statement, part of any command executed in a && or > || list except the command following the final && or ||, any command > in a pipeline but the last, or if the command’s return status is being > inverted with !. If a compound command other than a subshell returns a > non-zero status because a command failed while -e was being ignored, > the shell does not exit. Additionally, further down: > If a compound command or shell function executes in a context where -e > is being ignored, none of the commands executed within the compound > command or function body will be affected by the -e setting, even if > -e is set and a command returns a failure status. If a compound > command or shell function sets -e while executing in a context where > -e is ignored, that setting will not have any effect until the > compound command or the command containing the function call > completes. Thus, the only way to have our `.integration-daemon-stop` script actually run appropriately to clean up our daemon on test/script failure is to use `trap ... EXIT`, which we traditionally avoid because it does not have any stacking capabilities, but in this case is a reasonable compromise because it's going to be the only script using it (for now, at least; we can evaluate more complex solutions in the future if they actually become necessary). The alternatives were much less reasonable. One is to have the entire complex chains in any script wanting to use `.integration-daemon-start` / `.integration-daemon-stop` be chained together with `&&` in an `if` block, which is untenable. The other I could think of was taking the body of these scripts out into separate scripts, essentially meaning we'd need two files for each of these, which further complicates the maintenance. Add to that the fact that our `trap ... EXIT` is scoped to the enclosing subshell (`( ... )`) and we're in even more reasonable territory with this pattern. Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
* hack/make/test-integration-cli: introduce MAKEDIR variableJörg Thalheim2015-04-151-6/+6
| | | | | | | - every execution of dirname costs time - less repeating Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
* Move scripts back to hack/, leave docs in project/Tianon Gravi2015-03-131-0/+31
| | | | | | This also removes the now-defunct `*maintainer*.sh` scripts that don't work with the new TOML format, and moves a couple not-build-or-release-related scripts to `contrib/` instead. Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
* Move 'hack' to the less confusing 'project'Solomon Hykes2014-11-091-46/+0
| | | | | | | We might want to break it up into smaller pieces (eg. tools in one place, documents in another) but let's worry about that later. Signed-off-by: Solomon Hykes <solomon@docker.com>
* Add Daemon test utilsTibor Vass2014-09-021-3/+5
| | | | Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
* Fix hanging on tests failingAlexandr Morozov2014-05-191-1/+2
| | | | | | Tee hanging when `go test` exit with non-zero code. Fixes #5672 Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
* Merge pull request #5464 from tianon/close-leftover-fdsMichael Crosby2014-04-301-0/+3
|\
| * Close extraneous file descriptors in containersTianon Gravi2014-04-291-0/+3
| | | | | | | | | | | | | | | | Without this patch, containers inherit the open file descriptors of the daemon, so my "exec 42>&2" allows us to "echo >&42 some nasty error with some bad advice" directly into the daemon log. :) Also, "hack/dind" was already doing this due to issues caused by the inheritance, so I'm removing that hack too since this patch obsoletes it by generalizing it for all containers. Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
* | Use "docker load" to create "scratch" in hack/make/test-integration-cli ↵Tianon Gravi2014-04-281-7/+1
|/ | | | | | | | (instead of implicitly pulling it from the index) Creating the "docker save" tarball for "scratch" is pretty simple. I've also extrapolated the "docker build -t busybox ." logic into a separate "hack/make/.ensure-busybox" file so that it can eventually be reused easier. Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
* Update some whitespace in hack/make/test-integration-cli for consistencyTianon Gravi2014-04-281-5/+5
| | | | Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
* Fetch the "busybox" image source so we can build locally instead of pulling ↵Tianon Gravi2014-04-141-1/+5
| | | | | | during the integration tests Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
* cli integ: don't fetch busybox if it existsunclejack2014-04-131-1/+4
| | | | | | Don't make calls to the registry if the image exists already. Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
* Update bundlescripts to use "set -e" consistentlyTianon Gravi2014-04-091-2/+1
| | | | | | "set -e" is already inherited here from make.sh, but explicit is always better than implicit (hence the "set -e" in the first place!) Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
* Update test-integration-cli bundlescript for consistency with other ↵Tianon Gravi2014-04-071-22/+27
| | | | | | bundlescripts and slightly more verbose logging of which commands were executed Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
* cli integration: fix wait raceunclejack2014-04-041-1/+1
| | | | | | | | | | The wait at the end of cli integration script could end up failing if the process had already exited. This was making it look like the tests have failed. This change fixes the problem. Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
* cli integration: allow driver selection via varsunclejack2014-04-041-1/+4
| | | | | | | This makes it possible to choose the graphdriver and the execdriver which is going to be used for the cli integration tests. Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
* integration-cli: pull busybox before runningunclejack2014-03-311-0/+4
| | | | | | | Make sure the busybox image is ready to be used when running the cli integration tests. Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
* Small tweaks to the hack scripts to make them simplerTianon Gravi2014-03-291-16/+7
| | | | | | Please do with this as you please (including rebasing and/or squashing it), especially under clause (c) of the DCO. Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
* initial version of cli integration testsunclejack2014-03-291-0/+37
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)