diff --git a/command/e2etest/init_test.go b/command/e2etest/init_test.go index 0f5e19b355..5e69951c3e 100644 --- a/command/e2etest/init_test.go +++ b/command/e2etest/init_test.go @@ -373,13 +373,13 @@ func TestInitProviderWarnings(t *testing.T) { tf := e2e.NewBinary(terraformBin, fixturePath) defer tf.Close() - _, stderr, err := tf.Run("init") + stdout, _, err := tf.Run("init") if err == nil { t.Fatal("expected error, got success") } - if !strings.Contains(stderr, "This provider is archived and no longer needed. The terraform_remote_state\ndata source is built into the latest Terraform release.") { - t.Errorf("expected warning message is missing from output:\n%s", stderr) + if !strings.Contains(stdout, "This provider is archived and no longer needed. The terraform_remote_state\ndata source is built into the latest Terraform release.") { + t.Errorf("expected warning message is missing from output:\n%s", stdout) } } diff --git a/command/e2etest/provider_dev_test.go b/command/e2etest/provider_dev_test.go index 3c779c5a3e..a319715359 100644 --- a/command/e2etest/provider_dev_test.go +++ b/command/e2etest/provider_dev_test.go @@ -62,7 +62,7 @@ func TestProviderDevOverrides(t *testing.T) { // to "install" them. This test is mimicking the a happy path of going // directly from "go build" to validate/plan/apply without interacting // with any registries, mirrors, lock files, etc. - stdout, stderr, err = tf.Run("validate") + stdout, _, err = tf.Run("validate") if err != nil { t.Fatalf("unexpected error: %s\n%s", err, stderr) } @@ -70,7 +70,7 @@ func TestProviderDevOverrides(t *testing.T) { if got, want := stdout, `The configuration is valid, but`; !strings.Contains(got, want) { t.Errorf("stdout doesn't include the success message\nwant: %s\n%s", want, got) } - if got, want := stderr, `Provider development overrides are in effect`; !strings.Contains(got, want) { + if got, want := stdout, `Provider development overrides are in effect`; !strings.Contains(got, want) { t.Errorf("stdout doesn't include the warning about development overrides\nwant: %s\n%s", want, got) } }