fix tests

This commit is contained in:
Megan Marsh 2020-05-06 09:27:20 -07:00
parent aa09c52059
commit 5b4de6b16f
1 changed files with 3 additions and 2 deletions

View File

@ -2,6 +2,7 @@ package common
import (
"context"
"path/filepath"
"testing"
"github.com/hashicorp/packer/helper/multistep"
@ -57,7 +58,7 @@ func TestStepExport_OutputPath(t *testing.T) {
OutputDir: "output-dir",
OutputFilename: "output-filename",
},
Expected: "output-dir/output-filename.ova",
Expected: filepath.Join("output-dir", "output-filename.ova"),
Reason: "output_filename should not be vmName if set.",
},
{
@ -66,7 +67,7 @@ func TestStepExport_OutputPath(t *testing.T) {
OutputDir: "output-dir",
OutputFilename: "",
},
Expected: "output-dir/foo.ovf",
Expected: filepath.Join("output-dir", "foo.ovf"),
Reason: "output_filename should default to vmName.",
},
}