Update HasResource to HasManagedResourceInstanceObjects

This commit is contained in:
Omar Ismail 2021-10-21 09:55:27 -04:00 committed by Chris Arcand
parent 86f93a2cbc
commit 5ff2495ffa

View File

@ -890,7 +890,7 @@ func TestCloud_applyForceLocal(t *testing.T) {
if output := done(t).Stdout(); !strings.Contains(output, "1 to add, 0 to change, 0 to destroy") {
t.Fatalf("expected plan summary in output: %s", output)
}
if !run.State.HasResources() {
if !run.State.HasManagedResourceInstanceObjects() {
t.Fatalf("expected resources in state")
}
}
@ -953,7 +953,7 @@ func TestCloud_applyWorkspaceWithoutOperations(t *testing.T) {
if output := done(t).Stdout(); !strings.Contains(output, "1 to add, 0 to change, 0 to destroy") {
t.Fatalf("expected plan summary in output: %s", output)
}
if !run.State.HasResources() {
if !run.State.HasManagedResourceInstanceObjects() {
t.Fatalf("expected resources in state")
}
}
@ -1565,7 +1565,7 @@ func TestCloud_applyVersionCheck(t *testing.T) {
output := b.CLI.(*cli.MockUi).OutputWriter.String()
hasRemote := strings.Contains(output, "Running apply in Terraform Cloud")
hasSummary := strings.Contains(output, "1 added, 0 changed, 0 destroyed")
hasResources := run.State.HasResources()
hasResources := run.State.HasManagedResourceInstanceObjects()
if !tc.forceLocal && tc.hasOperations {
if !hasRemote {
t.Errorf("missing TFC header in output: %s", output)