Commit Graph

9 Commits

Author SHA1 Message Date
Kir Kolyshkin 6f8070deb2 Switch from x/net/context to context
Since go 1.7, "context" is a standard package. Since go 1.9,
x/net/context merely provides some types aliased to those in
the standard context package.

The changes were performed by the following script:

for f in $(git ls-files \*.go | grep -v ^vendor/); do
	sed -i 's|golang.org/x/net/context|context|' $f
	goimports -w $f
	for i in 1 2; do
		awk '/^$/ {e=1; next;}
			/\t"context"$/ {e=0;}
			{if (e) {print ""; e=0}; print;}' < $f > $f.new && \
				mv $f.new $f
		goimports -w $f
	done
done

[v2: do awk/goimports fixup twice]
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-05-11 16:49:43 -07:00
Vincent Demeester 31dc5c0a9a
Fix `--label` behavior on run
Commit 2b17f4c8a8 fixed the way empty labels
are taken into account (i.e. not interpolated from environment variable),
but it created a regression.

`ValidateLabel` functions doesn't allow empty label value, but it has
always been possible to pass an empty label via the cli (`docker run --label foo`).

This fixes that by not validating the label flag.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-02-27 12:14:07 +01:00
Vincent Demeester 581b8d9d72
Add unit tests to docker container ls
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-02-19 11:22:36 +01:00
Kir Kolyshkin 85ddaee5af container.waitExitOrRemoved(): add a test case
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-01-16 10:16:28 -08:00
Jamie Hannaford 9c9303e113 add test for logs
Signed-off-by: Jamie Hannaford <jamie@limetree.org>
2017-11-13 10:57:44 +01:00
Daniel Nephin b7b62ca26a Adding unit tests for cp
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-10-30 18:33:28 -04:00
Daniel Nephin a0d8d80250 Fix crash in containe run after pulling an image.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-08-31 17:08:02 -04:00
Daniel Nephin e7f90b6b38 Reduce complexity in cli/command/container
Add tests for exec and cleanup existing tests.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-08-29 19:25:50 -04:00
Shukui Yang e8cc2cf760 Replace command.DockerCli to command.Cli in docker attach/exec command
Signed-off-by: Shukui Yang <yangshukui@huawei.com>
2017-06-08 07:03:52 +08:00