Skip to content

Commit

Permalink
Add missing =
Browse files Browse the repository at this point in the history
  • Loading branch information
paultyng committed Jul 13, 2020
1 parent c11057b commit 7f4af7c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tfexec/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func (tf *Terraform) importCmd(ctx context.Context, address, id string, opts ...
args = append(args, "-backup="+c.backup)
}
if c.config != "" {
args = append(args, "-config"+c.config)
args = append(args, "-config="+c.config)
}
if c.lockTimeout != "" {
args = append(args, "-lock-timeout="+c.lockTimeout)
Expand Down
10 changes: 8 additions & 2 deletions tfexec/import_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestImport(t *testing.T) {
ctx := context.Background()

for _, tfv := range []string{
// "0.11.14", doesn't support show JSON output, but does support import
"0.11.14", // doesn't support show JSON output, but does support import
"0.12.28",
"0.13.0-beta3",
} {
Expand All @@ -39,11 +39,17 @@ func TestImport(t *testing.T) {
t.Fatal(err)
}

err = tf.Import(ctx, resourceAddress, expectedID, DisableBackup(), Lock(false))
// Config is unnecessary here since its already the working dir, but just testing an additional flag
err = tf.Import(ctx, resourceAddress, expectedID, DisableBackup(), Lock(false), Config(td))
if err != nil {
t.Fatal(err)
}

if strings.HasPrefix(tfv, "0.11.") {
t.Logf("skipping state assertion for 0.11")
return
}

state, err := tf.StateShow(ctx)
if err != nil {
t.Fatal(err)
Expand Down

0 comments on commit 7f4af7c

Please sign in to comment.