warning are now in stdout
This commit is contained in:
parent
0c3bb316ea
commit
a75dcd4be0
|
@ -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)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue