Commit Graph

8 Commits

Author SHA1 Message Date
Chris Bandy facdb16b53 Replace os.Setenv with testing.T.Setenv in tests
T.Setenv ensures that the environment is returned to its prior state
when the test ends. It also panics when called from a parallel test to
prevent racy test interdependencies.

Kubernetes-commit: 2181eea48435310d1b6e366ea8db2968c4941b93
2023-04-15 10:09:47 -05:00
Arda Güçlü 3f05cfcd78 Migrate genericclioptions.IOStreams usage to genericiooptions
Kubernetes-commit: 00c30941260a27e6929aef84c7fdbc8f1508518c
2023-04-05 14:07:46 +03:00
inosato 8272d71ba6 Remove ioutil from kubectl
Signed-off-by: inosato <si17_21@yahoo.co.jp>

Kubernetes-commit: 774ab1349bfd553c97a99b992e9f38659f541c84
2022-07-30 22:31:16 +09:00
Brian Pursley 7a39dfc2d3 Change kubectl diff to exclude managedFields by default
Changes kubectl diff to exclude managedFields by default.
Adds a new --show-managed-fields flag that allows you to
include managed fields in the diff.

Kubernetes-commit: e88470c31f74cbb1ed685ef1bc2ba91e74fc1c5e
2022-07-27 12:53:32 -04:00
ZhengYuan Loo c155b7bb87 feat: masked secrets in kubectl diff output (#96084)
* fix tests

* add changes

Kubernetes-commit: 0cbf00ad018d5104e438b5693fde435fa06e30c9
2021-05-18 14:19:27 +00:00
Masashi Honma c011a4ab83 Fix a unit test failure in non English languages
This is a result in Japanese language.

$ make test WHAT=./staging/src/k8s.io/kubectl/pkg/cmd/diff
[0402 07:24:05] Running tests without code coverage
FAIL: TestDiffProgram (0.00s)
    diff_test.go:73: stdout = "ファイル /dev/zero と /dev/zero は同一です\n", expected = Files /dev/zero and /dev/zero are identical
        "
FAIL
FAIL	k8s.io/kubernetes/staging/src/k8s.io/kubectl/pkg/cmd/diff	0.045s
FAIL
make: *** [Makefile:184: test] エラー 1

Kubernetes-commit: 6b9ff98dd72503e0cad5c626f67c716d465d18b2
2021-04-02 15:59:47 +09:00
Douglas Schilling Landgraf bafd13fd9f kubectl: allow users to use args with KUBECTL_EXTERNAL_DIFF
Currently, if users try to use external diff command with arguments
will fail because the entire command won't be available through $PATH.
This patch allow users to use external diff tools with args (or not)
via KUBECTL_EXTERNAL_DIFF env.

Reference: https://github.com/kubernetes/kubectl/issues/937

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>

Kubernetes-commit: a6158c01b9add5b580059d24cb66e54c37ea2531
2020-10-04 23:29:27 -04:00
Sean Sullivan c6063dd846 Move pkg/kubectl/cmd/{command} to staging
Kubernetes-commit: 0e0ea523392f1121f61f99ac30a9bc2043eaed90
2019-08-01 11:01:40 -07:00