command/e2etest: fix incorrect "terraform version" test
Two different errors here caused this test to pass even though it was incorrect: the wanted version string was incorrect, but the test for it was also inverted, and so together this made the test pass even though it was actually not testing the output at all.
This commit is contained in:
parent
d33e0f0a58
commit
34cecfa839
|
@ -31,6 +31,8 @@ func TestVersion(t *testing.T) {
|
|||
t.Errorf("unexpected stderr output:\n%s", stderr)
|
||||
}
|
||||
|
||||
wantVersion := fmt.Sprintf("Terraform v%s", tfcore.VersionString())
|
||||
if !strings.Contains(stdout, wantVersion) {
|
||||
wantVersion := fmt.Sprintf("Terraform %s", tfcore.VersionString())
|
||||
if strings.Contains(stdout, wantVersion) {
|
||||
t.Errorf("output does not contain our current version %q:\n%s", wantVersion, stdout)
|
||||
|
|
Loading…
Reference in New Issue