command/show_test: Update expected error text

This commit is contained in:
Nick Fagerlund 2023-06-26 18:00:24 -07:00 committed by Sebastian Rivera
parent 3a9ce2afb1
commit 12af8518ff

View File

@ -201,9 +201,13 @@ func TestShow_argsPlanFileDoesNotExist(t *testing.T) {
} }
got := output.Stderr() got := output.Stderr()
want := `Plan read error: open doesNotExist.tfplan:` want1 := `Plan read error: couldn't load the provided path`
if !strings.Contains(got, want) { want2 := `open doesNotExist.tfplan: no such file or directory`
t.Errorf("unexpected output\ngot: %s\nwant:\n%s", got, want) if !strings.Contains(got, want1) {
t.Errorf("unexpected output\ngot: %s\nwant:\n%s", got, want1)
}
if !strings.Contains(got, want2) {
t.Errorf("unexpected output\ngot: %s\nwant:\n%s", got, want2)
} }
} }
@ -256,9 +260,13 @@ func TestShow_json_argsPlanFileDoesNotExist(t *testing.T) {
} }
got := output.Stderr() got := output.Stderr()
want := `Plan read error: open doesNotExist.tfplan:` want1 := `Plan read error: couldn't load the provided path`
if !strings.Contains(got, want) { want2 := `open doesNotExist.tfplan: no such file or directory`
t.Errorf("unexpected output\ngot: %s\nwant:\n%s", got, want) if !strings.Contains(got, want1) {
t.Errorf("unexpected output\ngot: %s\nwant:\n%s", got, want1)
}
if !strings.Contains(got, want2) {
t.Errorf("unexpected output\ngot: %s\nwant:\n%s", got, want2)
} }
} }