mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-03 20:57:09 -06:00
core: Improve failure output for TestContext2Apply_resourceCountOneList
This commit is contained in:
parent
e488ff126e
commit
80b20a1d9b
@ -179,20 +179,18 @@ func TestContext2Apply_resourceCountOneList(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
state, diags := ctx.Apply()
|
state, diags := ctx.Apply()
|
||||||
if diags.HasErrors() {
|
assertNoDiagnostics(t, diags)
|
||||||
t.Fatalf("diags: %s", diags.Err())
|
|
||||||
}
|
|
||||||
|
|
||||||
actual := strings.TrimSpace(state.String())
|
got := strings.TrimSpace(state.String())
|
||||||
expected := strings.TrimSpace(`null_resource.foo:
|
want := strings.TrimSpace(`null_resource.foo:
|
||||||
ID = foo
|
ID = foo
|
||||||
provider = provider.null
|
provider = provider.null
|
||||||
|
|
||||||
Outputs:
|
Outputs:
|
||||||
|
|
||||||
test = [foo]`)
|
test = [foo]`)
|
||||||
if actual != expected {
|
if got != want {
|
||||||
t.Fatalf("expected: \n%s\n\ngot: \n%s\n", expected, actual)
|
t.Fatalf("got:\n%s\n\nwant:\n%s\n", got, want)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
func TestContext2Apply_resourceCountZeroList(t *testing.T) {
|
func TestContext2Apply_resourceCountZeroList(t *testing.T) {
|
||||||
|
Loading…
Reference in New Issue
Block a user