packer_test: remove %d from workdir path

'%d' gets output as-is in the temporary workdir we create. This is
unnecessary and could even be problematic in some cases, so we scrub it
from the MkdirTemp call.
pull/12983/head
Lucas Bajolet 2 years ago
parent 164f091f10
commit 37b33c5326

@ -276,7 +276,7 @@ func WriteFile(t *testing.T, dest string, content string) {
// If any file cannot be found, this function will fail
func TempWorkdir(t *testing.T, files ...string) (string, func()) {
var err error
tempDir, err := os.MkdirTemp("", "packer-test-workdir-%d")
tempDir, err := os.MkdirTemp("", "packer-test-workdir-")
if err != nil {
t.Fatalf("failed to create temporary working directory: %s", err)
}

Loading…
Cancel
Save