Remove tmp files created by builder/alicloud/ecs tests

This commit is contained in:
DanHam 2018-04-25 12:30:54 +01:00
parent 7e478f650e
commit 96adb4a9d1
No known key found for this signature in database
GPG Key ID: 58E79AEDD6AA987E
1 changed files with 3 additions and 0 deletions

View File

@ -2,6 +2,7 @@ package ecs
import (
"io/ioutil"
"os"
"testing"
"github.com/hashicorp/packer/helper/communicator"
@ -68,6 +69,7 @@ func TestRunConfigPrepare_UserData(t *testing.T) {
if err != nil {
t.Fatalf("err: %s", err)
}
defer os.Remove(tf.Name())
defer tf.Close()
c.UserData = "foo"
@ -92,6 +94,7 @@ func TestRunConfigPrepare_UserDataFile(t *testing.T) {
if err != nil {
t.Fatalf("err: %s", err)
}
defer os.Remove(tf.Name())
defer tf.Close()
c.UserDataFile = tf.Name()