Commit Graph

27 Commits

Author SHA1 Message Date
Mathieu Champlon 4d947de292 Support 'all' in orchestrator flag for docker stack ls
All other docker stack commands report an error when passed this value.

Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
2018-05-15 15:38:41 +02:00
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 b29844f8ca
Make testing helpers as such…
That way, those lines won't be reported in the failure.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-04-18 17:02:21 +02:00
Vincent Demeester 8b00c5cfd8
Add more content trust tests
Importing from moby's DockerTrustSuite tests.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-03-19 10:02:40 +01:00
Daniel Nephin feae0e9756 Only read trust setting from options
Rename IsTrusted to ContentTrustEnabled

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-03-08 16:46:30 -05:00
Vincent Demeester 6e21829af4 Refactor content_trust cli/flags handling
Remove the global variable used. Allows easier unit testing.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-03-08 15:00:43 -05:00
Daniel Nephin 681c921528 Remove testutil
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-03-06 14:38:35 -05:00
Daniel Nephin 7c8b5708eb Don't set a default filename for ConfigFile
With a default filename tests will leave a file in the working directory
that is never cleaned up.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-03-06 13:32:50 -05:00
Daniel Nephin 5155cda716 Post migration fixes
Fix tests that failed when using cmp.Compare()
internal/test/testutil/assert
InDelta
Fix DeepEqual with kube metav1.Time
Convert some ErrorContains to assert

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-03-05 19:41:17 -05:00
Daniel Nephin 39c2ca57c1 Automated migration
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-03-05 19:41:17 -05:00
shhsu@microsoft.com 8883cd636a Silent login: if user did not provide -u and -p flag for login command but both username and password are retrieved in cred store, docker will automatically use the credentials found in the cred store to log in
Signed-off-by: shhsu@microsoft.com <shhsu@microsoft.com>
Signed-off-by: Peter Hsu <shhsu@microsoft.com>
Signed-off-by: shhsu <shhsu@microsoft.com>
Signed-off-by: Peter Hsu <shhsu@microsoft.com>
2018-02-22 09:14:51 -08:00
Vincent Demeester 1e8530bc34
Merge pull request #885 from thaJeztah/node-engine-version
Add Engine version to docker node ls
2018-02-20 18:45:36 +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
Sebastiaan van Stijn e888dd711f
Add Engine version to docker node ls
This adds the Engine version to `docker node ls`, and `.EngineVersion` as a
template option.

With this patch applied:

    docker node ls
    ID                            HOSTNAME                STATUS              AVAILABILITY        MANAGER STATUS      ENGINE VERSION
    wp9231itoqsh4rqceojqo01vp *   linuxkit-025000000001   Ready               Active              Leader              18.01.0-ce

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-02-17 02:58:05 +01:00
Christy Perez db6d87216d manifest tests
create, annotate, & push

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
2018-01-08 11:12:57 -06:00
Christy Perez 02719bdbb5 add manifest command
Enable inspection (aka "shallow pull") of images' manifest info, and
also the creation of manifest lists (aka "fat manifests").

The workflow for creating a manifest list will be:

`docker manifest create new-list-ref-name image-ref [image-ref...]`
`docker manifest annotate new-list-ref-name image-ref --os linux --arch
arm`
`docker manifest push new-list-ref-name`

The annotate step is optional. Most architectures are fine by default.

There is also a `manifest inspect` command to allow for a "shallow pull"
of an image's manifest: `docker manifest inspect
manifest-or-manifest_list`.

To be more in line with the existing external manifest tool, there is
also a `-v` option for inspect that will show information depending on
what the reference maps to (list or single manifest).

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-01-08 10:43:56 -06:00
Silvin Lubecki ad409767bf Activate kubernetes only when experimental cli is enabled
* Refactor tests on version and kubernetes switch
* Fix rebase errors
* Refactor for gocyclo linter

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2017-12-28 14:40:10 +01:00
Sebastiaan van Stijn 6cd58063fa
Move notary to its new location
The https://github.com/docker/notary repository has moved to
https://github.com/theupdateframework/notary

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-10-30 17:21:41 +01:00
Riyaz Faizullabhoy 6fca400f1e tests: address review feedback
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-09-25 09:38:41 -07:00
Sebastiaan van Stijn 3edf97e5a9 Merge pull request #366 from twistlock/plugable_secrets_backend
Plugable secrets backend
2017-09-18 19:25:15 +02:00
Liron Levin 0ee9e05d8f Plugable secret backend
This commit extends SwarmKit secret management with pluggable secret
backends support.
Following previous commits:
1. docker/swarmkit@eebac27434
2. docker/docker@08f7cf0526
Added driver parameter to `docker secret` command.

Specifically:

1. `docker secret create [secret_name] --driver [driver_name]`
2.  Displaying the driver in
```
    $ docker secret ls
    $ docker secret inspect [secret_name]
    $ docker secret inspect [secret_name] -pretty
```

Signed-off-by: Liron Levin <liron@twistlock.com>
2017-09-07 11:10:44 +03:00
Daniel Nephin 677d17150a Move common e2e things into an internal package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-09-06 17:07:38 -04:00
Daniel Nephin 5c5cdd0e36 Merge pull request #424 from simonferquel/update-vendoring
updated vendoring
2017-09-05 15:06:09 -04:00
Simon Ferquel a0113c3a44 updated vendoring
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
2017-09-01 19:41:06 -04:00
khaled souf 15d92a9e03 adding network list test
Signed-off-by: khaled souf <khaled.souf@gmail.com>
2017-08-29 16:30:37 +02:00
Daniel Nephin ffed6f5ff9 Add TESTING document.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-08-24 14:45:50 -04:00
Daniel Nephin b3f843afe2 Move internal/test package out of cli.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-08-22 10:14:25 -04:00