mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
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
This commit is contained in:
parent
a651804427
commit
6b9ff98dd7
@ -54,6 +54,11 @@ func (f *FakeObject) Live() runtime.Object {
|
||||
func TestDiffProgram(t *testing.T) {
|
||||
externalDiffCommands := [3]string{"diff", "diff -ruN", "diff --report-identical-files"}
|
||||
|
||||
if oriLang := os.Getenv("LANG"); oriLang != "C" {
|
||||
os.Setenv("LANG", "C")
|
||||
defer os.Setenv("LANG", oriLang)
|
||||
}
|
||||
|
||||
for i, c := range externalDiffCommands {
|
||||
os.Setenv("KUBECTL_EXTERNAL_DIFF", c)
|
||||
streams, _, stdout, _ := genericclioptions.NewTestIOStreams()
|
||||
|
Loading…
Reference in New Issue
Block a user