Commit Graph

15 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
661cbe6823
Merge pull request #109850 from ardaguclu/validate-nooptdefval
Define NoOptDefVal for validate flag
2022-06-13 08:04:11 -07:00
Davanum Srinivas
50bea1dad8
Move from k8s.gcr.io to registry.k8s.io
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-05-31 10:16:53 -04:00
Arda Güçlü
0245e74590 Define NoOptDefVal for validate flag
validate flag does not have default value defined when there is no
parameter passed, therefore it tries to use next irrelevant flag.

This PR defines NoOptDefVal for validate flag which is set "strict".
2022-05-06 14:17:50 +03:00
Kevin Delgado
b0f3b5a796 Adjust validation checks to pass for both client-side and server-side validation 2022-03-26 03:45:13 +00:00
Kevin Delgado
0bb1a32411 Expand newly created cmd-test
Modify newly created cmd-test to work for both
client-side and server-side validation
2022-03-26 03:45:13 +00:00
Kevin Delgado
fe3772890f add server-side validation support to kubectl 2022-03-26 03:45:13 +00:00
Masashi Honma
e8c038c96d Fix tests using kubectl convert
hack/make-rules/test-cmd.sh script fails with tariling errors.

Error: unknown command "convert" for "kubectl"

1. This PR fixes the errors by replacing or removing the use of
"kubectl convert" option because it was already removed.

2. Fix trailing shell check failure as well.
In ./test/cmd/generic-resources.sh line 366:
  kube::test::get_object_assert deployment "{{range.items}}{{$image_field0}}:{{end}}" "${IMAGE_NGINX}:${IMAGE_NGINX}:"
2021-02-18 08:24:07 +09:00
Shihang Zhang
d40f0c43c4 separate RootCAConfigMap from BoundServiceAccountTokenVolume 2020-11-04 17:10:39 -08:00
Julian V. Modesto
13b80b48cd Use --dry-run=client,server in kubectl.
- Support --dry-run=server for subcommands apply, run, create, annotate,
expose, patch, label, autoscale, apply set-last-applied, drain, rollout undo
- Support --dry-run=server for set subcommands
  - image
  - resources
  - serviceaccount
  - selector
  - env
  - subject
- Support --dry-run=server for create subcommands.
  - clusterrole
  - clusterrolebinding
  - configmap
  - cronjob
  - job
  - deployment
  - namespace
  - poddisruptionbudget
  - priorityclass
  - quota
  - role
  - rolebinding
  - service
  - secret
  - serviceaccount
- Remove GetClientSideDryRun
2020-02-12 20:46:54 -05:00
Maciej Szulik
82f97775b7
Remove kubectl run generators 2020-01-22 16:44:00 +01:00
Odin Ugedal
6a73c0899a
Fix shellcheck failures SC2251
https://github.com/koalaman/shellcheck/wiki/SC2251

This may be masking some test failures.

We have a bunch of test code like this:

set -o errexit
[...]
! kubectl get pod wrong-pod
[...]

This test will succeed no matter what the result (return code) of kubectl is.
2019-10-23 22:47:47 +02:00
Xiangyang Chu
81eb22900b Fix shellchecks in test/cmd/{b,c}.*.sh 2019-06-04 14:42:01 +08:00
Jingfang Liu
beacc87ebf add cmdline tests for -k 2019-02-25 16:31:03 -08:00
Maciej Szulik
4ced88b162
Full blown kubectl create job 2018-08-01 15:04:04 +02:00
David Eads
aa8110044d straight split of test-cmd 2018-07-05 11:38:26 -04:00