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()
want := `Plan read error: open doesNotExist.tfplan:`
if !strings.Contains(got, want) {
t.Errorf("unexpected output\ngot: %s\nwant:\n%s", got, want)
want1 := `Plan read error: couldn't load the provided path`
want2 := `open doesNotExist.tfplan: no such file or directory`
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()
want := `Plan read error: open doesNotExist.tfplan:`
if !strings.Contains(got, want) {
t.Errorf("unexpected output\ngot: %s\nwant:\n%s", got, want)
want1 := `Plan read error: couldn't load the provided path`
want2 := `open doesNotExist.tfplan: no such file or directory`
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)
}
}