mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Merge pull request #100763 from masap/unit_test2
Fix a unit test failure in non English languages
This commit is contained in:
commit
2babe67f47
@ -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