fix: Shadow err in TestProvision_Cancel to fix test race (#3579)

Fixes #3574
This commit is contained in:
Mathias Fredriksson
2022-08-19 11:56:28 +03:00
committed by GitHub
parent 4ba3573632
commit 3fdae47b87

View File

@ -100,7 +100,7 @@ func TestProvision_Cancel(t *testing.T) {
// Example: exec /path/to/terrafork_fake_cancel.sh 1.2.1 apply "$@"
content := fmt.Sprintf("#!/bin/sh\nexec %q %s %s \"$@\"\n", fakeBin, terraform.TerraformVersion.String(), tt.mode)
err = os.WriteFile(binPath, []byte(content), 0o755) //#nosec
err := os.WriteFile(binPath, []byte(content), 0o755) //#nosec
require.NoError(t, err)
ctx, api := setupProvisioner(t, &provisionerServeOptions{