Remove tmp directories created by builder/parallels/common tests
This commit is contained in:
parent
5642f8cb01
commit
475b3978d2
|
@ -16,6 +16,7 @@ func TestIPAddress(t *testing.T) {
|
||||||
t.Fatalf("err: %s", err)
|
t.Fatalf("err: %s", err)
|
||||||
}
|
}
|
||||||
defer os.Remove(tf.Name())
|
defer os.Remove(tf.Name())
|
||||||
|
defer tf.Close()
|
||||||
|
|
||||||
d := Parallels9Driver{
|
d := Parallels9Driver{
|
||||||
dhcpLeaseFile: tf.Name(),
|
dhcpLeaseFile: tf.Name(),
|
||||||
|
@ -62,9 +63,9 @@ func TestIPAddress(t *testing.T) {
|
||||||
func TestXMLParseConfig(t *testing.T) {
|
func TestXMLParseConfig(t *testing.T) {
|
||||||
td, err := ioutil.TempDir("", "configpvs")
|
td, err := ioutil.TempDir("", "configpvs")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Error creating temp file: %s", err)
|
t.Fatalf("Error creating temp dir: %s", err)
|
||||||
}
|
}
|
||||||
defer os.Remove(td)
|
defer os.RemoveAll(td)
|
||||||
|
|
||||||
config := []byte(`
|
config := []byte(`
|
||||||
<ExampleParallelsConfig>
|
<ExampleParallelsConfig>
|
||||||
|
|
|
@ -28,6 +28,8 @@ func TestStepOutputDir_impl(t *testing.T) {
|
||||||
func TestStepOutputDir(t *testing.T) {
|
func TestStepOutputDir(t *testing.T) {
|
||||||
state := testState(t)
|
state := testState(t)
|
||||||
step := testStepOutputDir(t)
|
step := testStepOutputDir(t)
|
||||||
|
// Delete the test output directory when done
|
||||||
|
defer os.RemoveAll(step.Path)
|
||||||
|
|
||||||
// Test the run
|
// Test the run
|
||||||
if action := step.Run(context.Background(), state); action != multistep.ActionContinue {
|
if action := step.Run(context.Background(), state); action != multistep.ActionContinue {
|
||||||
|
|
Loading…
Reference in New Issue