Skip to content

Commit

Permalink
fix InvalidDir workdir test for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanhitt committed Dec 3, 2020
1 parent 7be3f2d commit bda6b73
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/app/test_command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,11 @@ func Test_ConvergeResults(t *testing.T) {

func Test_TestCommand_InvalidDir(t *testing.T) {
err := TestCommand("foo", TestCommandContext{Workdir: "invalid_dir"})
assert.Contains(t, err.Error(), "no such file or directory")
if runtime.GOOS == "windows" {
assert.Contains(t, err.Error(), "The system cannot find the file specified")
} else {
assert.Contains(t, err.Error(), "no such file or directory")
}
}

func captureOutput(f func()) string {
Expand Down

0 comments on commit bda6b73

Please sign in to comment.