builtin/provisioners/remote-exec: staticcheck

This commit is contained in:
James Bardin 2020-12-01 16:55:50 -05:00
parent 0b4c96fa92
commit 313d3e5c4d
1 changed files with 5 additions and 8 deletions

View File

@ -12,7 +12,6 @@ import (
"github.com/hashicorp/terraform/communicator"
"github.com/hashicorp/terraform/communicator/remote"
"github.com/hashicorp/terraform/internal/legacy/terraform"
"github.com/hashicorp/terraform/provisioners"
"github.com/mitchellh/cli"
"github.com/zclconf/go-cty/cty"
@ -238,11 +237,10 @@ func TestProvisionerTimeout(t *testing.T) {
done := make(chan struct{})
var runErr error
go func() {
defer close(done)
if err := runScripts(ctx, o, c, scripts); err != nil {
t.Fatal(err)
}
runErr = runScripts(ctx, o, c, scripts)
}()
select {
@ -252,8 +250,7 @@ func TestProvisionerTimeout(t *testing.T) {
}
<-done
}
func testConfig(t *testing.T, c map[string]interface{}) *terraform.ResourceConfig {
return terraform.NewResourceConfigRaw(c)
if runErr != nil {
t.Fatal(err)
}
}