Skip to content

Commit

Permalink
Check if .terraform dir exits after init
Browse files Browse the repository at this point in the history
  • Loading branch information
minamijoyo committed Jul 28, 2020
1 parent 0856e08 commit 3c77848
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tfexec/terraform_init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package tfexec

import (
"context"
"os"
"path/filepath"
"testing"
)

Expand Down Expand Up @@ -95,4 +97,8 @@ func TestAccTerraformCLIInit(t *testing.T) {
if err != nil {
t.Fatalf("failed to run terraform init: %s", err)
}

if _, err := os.Stat(filepath.Join(e.Dir(), ".terraform")); os.IsNotExist(err) {
t.Fatalf("failed to find .terraform directory: %s", err)
}
}

0 comments on commit 3c77848

Please sign in to comment.