mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 09:02:53 +00:00
Address kyaml windows compatibility issues
This commit is contained in:
@@ -197,7 +197,10 @@ func TestFilter_ExitCode(t *testing.T) {
|
||||
t.FailNow()
|
||||
}
|
||||
|
||||
if !assert.EqualError(t, instance.GetExit(), "fork/exec /not/real/command: no such file or directory") {
|
||||
if !assert.Error(t, instance.GetExit()) {
|
||||
t.FailNow()
|
||||
}
|
||||
if !assert.Contains(t, instance.GetExit().Error(), "/not/real/command") {
|
||||
t.FailNow()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -426,7 +426,7 @@ metadata:
|
||||
|
||||
{
|
||||
name: "write_results_bad_results_file",
|
||||
expectedError: "open /not/real/file: no such file or directory",
|
||||
expectedError: "open /not/real/file:",
|
||||
noMakeResultsFile: true,
|
||||
run: testRun{
|
||||
output: `
|
||||
@@ -1048,7 +1048,10 @@ metadata:
|
||||
}
|
||||
output, err := tt.instance.Filter(inputs)
|
||||
if tt.expectedError != "" {
|
||||
if !assert.EqualError(t, err, tt.expectedError) {
|
||||
if !assert.Error(t, err) {
|
||||
t.FailNow()
|
||||
}
|
||||
if !assert.Contains(t, err.Error(), tt.expectedError) {
|
||||
t.FailNow()
|
||||
}
|
||||
return
|
||||
|
||||
@@ -481,7 +481,6 @@ spec:
|
||||
for i := range tests {
|
||||
test := tests[i]
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
os.Clearenv()
|
||||
for k, v := range test.env {
|
||||
os.Setenv(k, v)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user