Commit Graph

31 Commits

Author SHA1 Message Date
4f7a346b35 Scope orchestration selection to stack commands only
* Renaming DOCKER_ORCHESTRATOR to DOCKER_STACK_ORCHESTRATOR
* Renaming config file option "orchestrator" to "stackOrchestrator"
* "--orchestrator" flag is no more global but local to stack command and subcommands
* Cleaning all global orchestrator code
* Replicating Hidden flags in help and Supported flags from root command to stack command

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: 71272dd203
Component: cli
2018-06-21 17:12:31 -07:00
e92ec69f61 Update tests to use gotest.tools 👼
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 2c4de4fb5e
Component: cli
2018-06-08 18:24:26 +02:00
4fb60eb421 Add tests for Kubernetes
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: d420d67bcd
Component: cli
2018-05-29 15:26:07 +02:00
35713286b5 Make e2e test image
- Build image that contains everything needed to run e2e tests
- Add ability to run e2e tests against an endpoint

Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: 6b38918ce4
Component: cli
2018-05-29 13:39:31 +02:00
46fae6da7e 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>
Upstream-commit: 4d947de292
Component: cli
2018-05-15 15:38:41 +02:00
32a5db4523 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>
Upstream-commit: 6f8070deb2
Component: cli
2018-05-11 16:49:43 -07:00
9bd536589d Make testing helpers as such…
That way, those lines won't be reported in the failure.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: b29844f8ca
Component: cli
2018-04-18 17:02:21 +02:00
0aa2494ead Add more content trust tests
Importing from moby's DockerTrustSuite tests.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 8b00c5cfd8
Component: cli
2018-03-19 10:02:40 +01:00
a895fe3327 Only read trust setting from options
Rename IsTrusted to ContentTrustEnabled

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: feae0e9756
Component: cli
2018-03-08 16:46:30 -05:00
5e391186a8 Refactor content_trust cli/flags handling
Remove the global variable used. Allows easier unit testing.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 6e21829af4
Component: cli
2018-03-08 15:00:43 -05:00
6dbf483853 Remove testutil
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 681c921528
Component: cli
2018-03-06 14:38:35 -05:00
a6a881dbc7 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>
Upstream-commit: 7c8b5708eb
Component: cli
2018-03-06 13:32:50 -05:00
146b9fed38 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>
Upstream-commit: 5155cda716
Component: cli
2018-03-05 19:41:17 -05:00
ad1a2c9e1d Automated migration
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 39c2ca57c1
Component: cli
2018-03-05 19:41:17 -05:00
1b83ee58c9 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>
Upstream-commit: 8883cd636a
Component: cli
2018-02-22 09:14:51 -08:00
81f2f8b4a0 Merge pull request #885 from thaJeztah/node-engine-version
Add Engine version to docker node ls
Upstream-commit: 1e8530bc34
Component: cli
2018-02-20 18:45:36 +01:00
07a8b9380b Add unit tests to docker container ls
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 581b8d9d72
Component: cli
2018-02-19 11:22:36 +01:00
3657332c34 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>
Upstream-commit: e888dd711f
Component: cli
2018-02-17 02:58:05 +01:00
7a08117e1e 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>
Upstream-commit: db6d87216d
Component: cli
2018-01-08 11:12:57 -06:00
d25231dbba 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>
Upstream-commit: 02719bdbb5
Component: cli
2018-01-08 10:43:56 -06:00
cb8fda044c 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>
Upstream-commit: ad409767bf
Component: cli
2017-12-28 14:40:10 +01:00
095f04e761 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>
Upstream-commit: 6cd58063fa
Component: cli
2017-10-30 17:21:41 +01:00
1659928f34 tests: address review feedback
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 6fca400f1e
Component: cli
2017-09-25 09:38:41 -07:00
0a503dae01 Merge pull request #366 from twistlock/plugable_secrets_backend
Plugable secrets backend
Upstream-commit: 3edf97e5a9
Component: cli
2017-09-18 19:25:15 +02:00
3aa4929239 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>
Upstream-commit: 0ee9e05d8f
Component: cli
2017-09-07 11:10:44 +03:00
6fc4c48771 Move common e2e things into an internal package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 677d17150a
Component: cli
2017-09-06 17:07:38 -04:00
28cf6767d3 Merge pull request #424 from simonferquel/update-vendoring
updated vendoring
Upstream-commit: 5c5cdd0e36
Component: cli
2017-09-05 15:06:09 -04:00
4bafd44516 updated vendoring
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
Upstream-commit: a0113c3a44
Component: cli
2017-09-01 19:41:06 -04:00
6eb6b7d9d2 adding network list test
Signed-off-by: khaled souf <khaled.souf@gmail.com>
Upstream-commit: 15d92a9e03
Component: cli
2017-08-29 16:30:37 +02:00
3104a37598 Add TESTING document.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: ffed6f5ff9
Component: cli
2017-08-24 14:45:50 -04:00
b141cbce57 Move internal/test package out of cli.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: b3f843afe2
Component: cli
2017-08-22 10:14:25 -04:00