Skip to content

Commit 785f380

Browse files
committed
Fix test, add more assertions about output
1 parent e8617ef commit 785f380

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

internal/command/init_test.go

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3272,9 +3272,14 @@ func TestInit_stateStore_newWorkingDir(t *testing.T) {
32723272

32733273
// Check output
32743274
output := testOutput.All()
3275-
expectedOutput := `Initializing the state store...`
3276-
if !strings.Contains(output, expectedOutput) {
3277-
t.Fatalf("expected output to include %q, but got':\n %s", expectedOutput, output)
3275+
expectedOutputs := []string{
3276+
"Initializing the state store...",
3277+
"Terraform has been successfully initialized!",
3278+
}
3279+
for _, expected := range expectedOutputs {
3280+
if !strings.Contains(output, expected) {
3281+
t.Fatalf("expected output to include %q, but got':\n %s", expected, output)
3282+
}
32783283
}
32793284

32803285
// Assert the default workspace was created
@@ -3295,7 +3300,7 @@ func TestInit_stateStore_newWorkingDir(t *testing.T) {
32953300
v1_0_0, _ := version.NewVersion("1.0.0")
32963301
expectedState := &workdir.StateStoreConfigState{
32973302
Type: "test_store",
3298-
ConfigRaw: []byte("{\n \"bar\": null\n }"),
3303+
ConfigRaw: []byte("{\n \"value\": null\n }"),
32993304
Hash: uint64(3976463117), // Hash of empty config
33003305
Provider: &workdir.ProviderConfigState{
33013306
Version: v1_0_0,

0 commit comments

Comments
 (0)