Commit Graph

4940 Commits

Author SHA1 Message Date
56c837b651 Fix comment and misc code issues
Signed-off-by: Nassim 'Nass' Eddequiouaq <eddequiouaq.nassim@gmail.com>
Upstream-commit: 8c3d0b93d6
Component: cli
2018-03-09 20:46:37 +01:00
bb8f7ed84c Refactor trust view command into a --pretty flag on trust inspect
Signed-off-by: Nassim 'Nass' Eddequiouaq <eddequiouaq.nassim@gmail.com>
Upstream-commit: c5554f811b
Component: cli
2018-03-09 19:12:11 +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
925dbcac37 Merge pull request #925 from dnephin/add-build-test-symlink
Add a build unit test for symlinked context
Upstream-commit: 82f325ed81
Component: cli
2018-03-08 18:52:43 +01:00
5b9b83cf96 Add a build unit test for symlinked context
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 00b803b2d8
Component: cli
2018-03-07 13:04:33 -05:00
3d323d03af Remove unused powershell function
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 10baa756b2
Component: cli
2018-03-07 18:18:14 +01:00
39e1627a66 Fixes some unit tests to be able to run them on windows
Some of them are skipped for now (because the feature is not supported
or needs more work), some of them are fixed.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 0cf2e6353a
Component: cli
2018-03-07 18:18:13 +01:00
22b79a8c67 Add appveyor setup to build and unit test
Adds a `make.ps1` powershell script to make it easy to compile and test.

```
.\scripts\make.ps1 -Binary
INFO: make.ps1 starting at 03/01/2018 14:37:28
INFO: Building...

 ________   ____  __.
 \_____  \ |    |/ _|
 /   |   \|      <
 /    |    \    |  \
 \_______  /____|__ \
         \/        \/

INFO: make.ps1 ended at 03/01/2018 14:37:30

.\scripts\make.ps1 -TestUnit
```

The next step is to run e2e tests on windows too.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: facb22573d
Component: cli
2018-03-07 18:14:10 +01:00
bd1a3c6e68 Merge pull request #921 from dnephin/use-canonical-imports
testing: Use canonical asserts
Upstream-commit: 0e3677ead5
Component: cli
2018-03-07 12:00:34 -05:00
17282c064a Merge pull request #920 from dnephin/fix-image-build-github
Don't prompt for github creds in unit test
Upstream-commit: 485a01fb53
Component: cli
2018-03-07 14:22:52 +01:00
ac93c97ba9 Merge pull request #914 from justincormack/notaryup
Update Notary vendor to 0.6.0 release
Upstream-commit: f351f00f9e
Component: cli
2018-03-07 10:38:53 +01:00
ef941c7ad3 Convert assert.Check(t, is.Error()) to assert.Error
git grep -l -P '^\s+assert\.Check\(t, is\.Error\(' | \
    xargs perl -pi -e 's/^(\s+assert\.)Check\(t, is\.Error\((.*)\)$/\1Error(t, \2/'

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e15b208e96
Component: cli
2018-03-06 16:00:28 -05:00
0d96772294 manual clean of asserts
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f21276575f
Component: cli
2018-03-06 15:49:00 -05:00
b52b42c8db Convert assert.Check with
git grep -l -P '^\s+assert\.Check\(t, ' | \
    xargs perl -pi -e 's/^(\s+assert)\.Check(\(t, (?!is).*(\.Execute\(|\.Set\(|\.Write\(|\.Close\(|\.Untar\(|\.WriteFile\(|Validate\().*\)$)/\1.NilError\2/'

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 078cbc9c4b
Component: cli
2018-03-06 15:43:53 -05:00
dd7eb35a89 Convert to assert.NilError
Using:

  git grep -l '^\s\+assert\.Check(t, err)$' | \
    xargs sed -i -e 's/^\(\s\+assert\)\.Check(t, err)$/\1.NilError(t, err)/'

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: baf65a5502
Component: cli
2018-03-06 15:27:34 -05:00
dcb7fd9dc1 dont prompt for github creds in unit test
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 0f11a310fd
Component: cli
2018-03-06 15:27:09 -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
2625498b94 Cleanup config load error handling
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 789acb526c
Component: cli
2018-03-06 13:44:06 -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
e38d9c1064 Merge pull request #879 from dnephin/update-assertions
Replace testify assertions with gotestyourself/assert
Upstream-commit: a0b19f0ec2
Component: cli
2018-03-06 17:19:51 +01: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
40f9f0a5c0 Replace testify vendor with updated gotestyourself
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 5ef8835f23
Component: cli
2018-03-05 19:41:14 -05:00
9ccbb57610 Update some assertions.
and fix some tests

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 93615dd967
Component: cli
2018-03-05 17:15:24 -05:00
d8679c544e Use new APIClient interface
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: cff874122c
Component: cli
2018-03-05 16:34:22 -05:00
17f0eebf06 Update Notary vendor to 0.6.0 release
We were on a slightly earlier random commit.

We should try to stay on releases where possible...

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 9da428da2e
Component: cli
2018-03-02 14:56:12 +00:00
060165553c Merge pull request #911 from vdemeester/update-gotestyourself
Update gotestyourself dependency
Upstream-commit: c26f37c0cc
Component: cli
2018-02-28 18:07:37 +01:00
e11e04d02b Fix grammar typo in comment
Overriding is the incorrect part of speech for this sentence. It is more common to state that the values are overridden instead.

Other options would include:

```golang
// ldflags is overriding these values
```

```golang
// These values will be overridden by ldflags
```

etc.

Signed-off-by: Kevin Kirsche <kevin.kirsche@verizon.com>
Upstream-commit: 0e2fdc92ce
Component: cli
2018-02-28 11:29:40 -05:00
919ca49c30 Update gotestyourself dependency
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 98ba439f67
Component: cli
2018-02-28 16:11:02 +01:00
7c89f9b56b Merge pull request #909 from LydellManganti/LydellManganti-patch-1
Update run.md --restart to include unless-stopped
Upstream-commit: c19b272c09
Component: cli
2018-02-28 14:53:49 +01:00
63f4daf361 Update run.md --restart to include unless-stopped
Update --restart option to include unless-stopped to be consistent with https://docs.docker.com/config/containers/start-containers-automatically/#use-a-restart-policy

Signed-off-by: Lydell Manganti <lydell.manganti@gmail.com>
Upstream-commit: d281b72a98
Component: cli
2018-02-28 21:05:30 +10:00
697a64b33e Add more container cp tests
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 07cb69e9bc
Component: cli
2018-02-27 16:38:02 -05:00
be84720c48 Merge pull request #139 from shhsu/v3_credhelper
Silent login: use credentials from cred store to login
Upstream-commit: 2cc6ff131d
Component: cli
2018-02-27 19:08:53 +01:00
afdaedaad3 Merge pull request #904 from vdemeester/fix-run-label-flag-behavior
Fix `--label` behavior on run
Upstream-commit: a9c6c52dc0
Component: cli
2018-02-27 19:07:24 +01:00
37ba7892be Merge pull request #898 from silvin-lubecki/add-stack-to-version-command
Print Stack API and Kubernetes versions in version command
Upstream-commit: 2851c007fe
Component: cli
2018-02-27 17:14:55 +01:00
70e2992847 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>
Upstream-commit: 31dc5c0a9a
Component: cli
2018-02-27 12:14:07 +01:00
38e7824f05 fix the error message in Substitute function
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 5d8ce59a25
Component: cli
2018-02-26 15:29:17 -05:00
bb11b4e9b1 Added error message check to TestMandatoryVariableErrors test
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: e33bc48752
Component: cli
2018-02-26 15:29:17 -05:00
41c5444dac Refactor substitute to reduce cyclo complexity
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: ce544823b6
Component: cli
2018-02-26 15:29:17 -05:00
99c3d5bb04 added support for mandatory variables to cli/compose
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 99ecf57c6c
Component: cli
2018-02-26 15:29:17 -05:00
8fee7710b7 Merge pull request #900 from AkihiroSuda/sctp-doc
docs: mention sctp
Upstream-commit: 2813fae8f9
Component: cli
2018-02-26 11:28:44 +01:00
9f5c7766d0 Bump VERSION to 18.04.0-dev
The Docker 18.03 branch was cut from

CLI:    84c7dd6057
Engine: fb005971c2bd82de482d1cfe924f2f4ec60c60ae

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 06dd62ab1e
Component: cli
2018-02-26 11:06:07 +01:00
faa59fb288 docs: mention sctp
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: b85d87b8ab
Component: cli
2018-02-26 15:27:11 +09:00
d3e338ece5 Print Stack API version in version command
* Resolve Stack API using Kubernetes discovering API
* Refactor Kubernetes flags parsing

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: 854aad8927
Component: cli
2018-02-26 01:16:49 +01: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
9963a034b3 Merge pull request #896 from thaJeztah/templated-configs-secrets
Add --template-driver option for secrets/configs
Upstream-commit: ef7d8be86c
Component: cli
2018-02-22 09:44:16 +01:00
acea77d537 Merge pull request #843 from sepich/docs-for-pr33130
Document long form of --network and --network-add
Upstream-commit: 84c7dd6057
Component: cli
2018-02-21 23:26:39 +01:00
3b6356337c Add --template-driver option for secrets/configs
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d11b5ccdfa
Component: cli
2018-02-21 23:22:32 +01:00
da1330b479 Update authors
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ec92c08874
Component: cli
2018-02-21 20:53:40 +01:00