Commit Graph

17 Commits

Author SHA1 Message Date
Masashi Honma 309d0ee885 test: Fix deprecated --dry-run parameter
Some unit tests throw this warning.

W1013 09:06:21.581870  176998 helpers.go:567] --dry-run=true is deprecated (boolean value) and can be replaced with --dry-run=client.

This patch removes the warning by using --dry-run=client instead of --dry-run=true.

The unit tests that are affected are:

make test WHAT=./vendor/k8s.io/kubectl/pkg/cmd/apply GOFLAGS=-v
make test WHAT=./vendor/k8s.io/kubectl/pkg/cmd/create GOFLAGS=-v

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>

Kubernetes-commit: ad7cbac16354e19981e986bbc2b3fd9cfa930d45
2020-10-14 10:00:08 +09:00
SataQiu 7a93b067f4 kubectl: improve the warning message when doing kubectl apply to the resource without expected annotation
Signed-off-by: SataQiu <1527062125@qq.com>

Kubernetes-commit: 9c163f0a0a97a9bcf10c3f91d2cee02567700d84
2020-07-29 10:39:59 +08:00
Yuvaraj Kakaraparthi 36c221e3cf kubectl: cannot use --force with --server-side
Kubernetes-commit: f93ad0204eeeb21e567df3d5841847373bf7a646
2020-07-06 10:07:26 -07:00
zhouya0 7b9fac0696 Add kubectl apply generate name error message
Kubernetes-commit: c91ef266973904c82894492b887deb2a04b6d998
2020-03-10 15:51:41 +08:00
Brian Pursley b4594b0812 Added kubectl apply check to prevent using --dry-run=server with --force
Kubernetes-commit: 99f6dca1a8d1ea64d22a68263c77bcafd6fedc48
2020-04-16 21:23:36 -04:00
Julian V. Modesto 0d395d7c98 Make client-side apply safer
- Remove the ServerDryRun field and delegate it entirely to the resource.Helper
- Use resource.Helper for deletions (as in `kubectl apply --force`)
instead of using the pruner's method that uses a dynamic client
- Reduce the resource.Helpers and times we check for server-side dry-run
in apply

Kubernetes-commit: f0eb68c0cfcff6d50d9d5ec278f96820e3cb3f9a
2020-04-02 18:26:32 -04:00
Julian V. Modesto a3f7877cd1 Support DryRun in cli-runtime REST Helper.
- Move TestSupportsDryRun to cli-runtime
- Move TestDryRunVerifier to cli-runtime
- Add OpenAPI schema for testdata to cli-runtime
- Use Helper.DryRun and DryRunVerifier for Apply
- Add WithOptions methods to Helper

Kubernetes-commit: 6bea0e469bcfe4967cbf2656a998d60e0b684747
2019-12-18 22:00:34 -05:00
martinkaburu 50f26dd951 fix apply --prune to check cli specified namespace
Kubernetes-commit: f2518347f3dbe36586367c94aa98d5096f74a742
2019-11-25 23:21:43 +03:00
danielqsj 4b914450ab unify alias of api errors under pkg and staging
Kubernetes-commit: 5bc0e26c1902e7e28abfc828de19a2dbb3e492c2
2019-11-12 16:26:59 +08:00
clarklee92 87db492820 Modify the status code number to HTTP status semantics
Signed-off-by: clarklee92 <clarklee1992@hotmail.com>

Kubernetes-commit: f86f5ee14ef3c8adf9855ce16dcc57beca949719
2019-11-06 00:45:35 +08:00
Sean Sullivan 3ec9685c39 Rename test/data directory to testdata
Kubernetes-commit: 4ce97d6c48ae4735463f020430dd20539a03e8c5
2019-10-31 13:40:02 -07:00
wojtekt 52d3bfc415 Minor cleanup of jsonFallbackEncoder
Kubernetes-commit: cd24a0e5fa7af1bd921386cf80c90cd535954e6c
2019-09-22 13:50:05 +02:00
ZP-AlwaysWin a376c2df78 replace 200 with http.StatusOK
Kubernetes-commit: cfa77048f9b7fa96bad4eebb059cf60acc9dfd29
2019-09-12 22:35:19 +08:00
Sean Sullivan 1cba7858ad Update test data to reflect code move to staging
Kubernetes-commit: 58b59ae4e07f9d3718271a43740a4de9508d8688
2019-08-01 15:17:53 -07:00
Sean Sullivan 1483769081 Update gofmt
Kubernetes-commit: e2cae2344486af198f8ab38e4dd97d4f24dfd190
2019-08-01 13:14:06 -07:00
Sean Sullivan 5b48717f2d Update import statements to reflect code move
Kubernetes-commit: acece3c2964115a4f29a43e368ad5de59dbbc258
2019-08-01 11:10:05 -07:00
Sean Sullivan c6063dd846 Move pkg/kubectl/cmd/{command} to staging
Kubernetes-commit: 0e0ea523392f1121f61f99ac30a9bc2043eaed90
2019-08-01 11:01:40 -07:00