fix test fixture path
This commit is contained in:
parent
88b7b0e14a
commit
ce99640fe2
@ -214,7 +214,7 @@ func TestBuilderPrepare_FloppyFiles(t *testing.T) {
|
||||
t.Fatalf("bad: %#v", b.config.FloppyFiles)
|
||||
}
|
||||
|
||||
floppiesPath := "../../../packer-plugin-sdk/test-fixtures/floppies"
|
||||
floppiesPath := "../../test-fixtures/floppies"
|
||||
config["floppy_files"] = []string{fmt.Sprintf("%s/bar.bat", floppiesPath), fmt.Sprintf("%s/foo.ps1", floppiesPath)}
|
||||
b = Builder{}
|
||||
_, warns, err = b.Prepare(config)
|
||||
|
@ -354,7 +354,7 @@ func TestBuilderPrepare_FloppyFiles(t *testing.T) {
|
||||
t.Fatalf("bad: %#v", b.config.FloppyFiles)
|
||||
}
|
||||
|
||||
floppies_path := "../../../packer-plugin-sdk/test-fixtures/floppies"
|
||||
floppies_path := "../../test-fixtures/floppies"
|
||||
config["floppy_files"] = []string{fmt.Sprintf("%s/bar.bat", floppies_path), fmt.Sprintf("%s/foo.ps1", floppies_path)}
|
||||
b = Builder{}
|
||||
_, warns, err = b.Prepare(config)
|
||||
|
@ -66,7 +66,7 @@ func TestBuilderPrepare_FloppyFiles(t *testing.T) {
|
||||
t.Fatalf("bad: %#v", b.config.FloppyFiles)
|
||||
}
|
||||
|
||||
floppies_path := "../../../packer-plugin-sdk/test-fixtures/floppies"
|
||||
floppies_path := "../../test-fixtures/floppies"
|
||||
config["floppy_files"] = []string{fmt.Sprintf("%s/bar.bat", floppies_path), fmt.Sprintf("%s/foo.ps1", floppies_path)}
|
||||
b = Builder{}
|
||||
_, warns, err = b.Prepare(config)
|
||||
|
@ -74,7 +74,7 @@ func TestNewConfig_sourcePath(t *testing.T) {
|
||||
|
||||
func TestNewConfig_FloppyFiles(t *testing.T) {
|
||||
c := testConfig(t)
|
||||
floppies_path := "../../../packer-plugin-sdk/test-fixtures/floppies"
|
||||
floppies_path := "../../test-fixtures/floppies"
|
||||
c["floppy_files"] = []string{fmt.Sprintf("%s/bar.bat", floppies_path), fmt.Sprintf("%s/foo.ps1", floppies_path)}
|
||||
_, err := (&Config{}).Prepare(c)
|
||||
if err != nil {
|
||||
|
@ -328,7 +328,7 @@ func TestBuilderPrepare_FloppyFiles(t *testing.T) {
|
||||
t.Fatalf("bad: %#v", c.FloppyFiles)
|
||||
}
|
||||
|
||||
floppies_path := "../../packer-plugin-sdk/test-fixtures/floppies"
|
||||
floppies_path := "../test-fixtures/floppies"
|
||||
config["floppy_files"] = []string{fmt.Sprintf("%s/bar.bat", floppies_path), fmt.Sprintf("%s/foo.ps1", floppies_path)}
|
||||
c = Config{}
|
||||
warns, err = c.Prepare(config)
|
||||
|
1
builder/test-fixtures/floppies/bar.bat
Normal file
1
builder/test-fixtures/floppies/bar.bat
Normal file
@ -0,0 +1 @@
|
||||
Echo I am a floppy with a batch file
|
1
builder/test-fixtures/floppies/foo.ps1
Normal file
1
builder/test-fixtures/floppies/foo.ps1
Normal file
@ -0,0 +1 @@
|
||||
Write-Host "I am a floppy with some Powershell"
|
@ -106,7 +106,7 @@ func TestBuilderPrepare_FloppyFiles(t *testing.T) {
|
||||
t.Fatalf("bad: %#v", b.config.FloppyFiles)
|
||||
}
|
||||
|
||||
floppies_path := "../../../packer-plugin-sdk/test-fixtures/floppies"
|
||||
floppies_path := "../../test-fixtures/floppies"
|
||||
config["floppy_files"] = []string{fmt.Sprintf("%s/bar.bat", floppies_path), fmt.Sprintf("%s/foo.ps1", floppies_path)}
|
||||
b = Builder{}
|
||||
_, warns, err = b.Prepare(config)
|
||||
|
@ -32,7 +32,7 @@ func getTempFile(t *testing.T) *os.File {
|
||||
|
||||
func TestNewConfig_FloppyFiles(t *testing.T) {
|
||||
cfg := testConfig(t)
|
||||
floppies_path := "../../../packer-plugin-sdk/test-fixtures/floppies"
|
||||
floppies_path := "../../test-fixtures/floppies"
|
||||
cfg["floppy_files"] = []string{fmt.Sprintf("%s/bar.bat", floppies_path), fmt.Sprintf("%s/foo.ps1", floppies_path)}
|
||||
var c Config
|
||||
_, err := c.Prepare(cfg)
|
||||
|
@ -107,7 +107,7 @@ func TestBuilderPrepare_FloppyFiles(t *testing.T) {
|
||||
t.Fatalf("bad: %#v", b.config.FloppyFiles)
|
||||
}
|
||||
|
||||
floppies_path := "../../../packer-plugin-sdk/test-fixtures/floppies"
|
||||
floppies_path := "../../test-fixtures/floppies"
|
||||
config["floppy_files"] = []string{fmt.Sprintf("%s/bar.bat", floppies_path), fmt.Sprintf("%s/foo.ps1", floppies_path)}
|
||||
b = Builder{}
|
||||
_, warns, err = b.Prepare(config)
|
||||
|
@ -36,7 +36,7 @@ func TestBuilderPrepare_FloppyFiles(t *testing.T) {
|
||||
t.Fatalf("bad: %#v", b.config.FloppyFiles)
|
||||
}
|
||||
|
||||
floppies_path := "../../../packer-plugin-sdk/test-fixtures/floppies"
|
||||
floppies_path := "../../test-fixtures/floppies"
|
||||
config["floppy_files"] = []string{fmt.Sprintf("%s/bar.bat", floppies_path), fmt.Sprintf("%s/foo.ps1", floppies_path)}
|
||||
b = Builder{}
|
||||
_, warns, err = b.Prepare(config)
|
||||
|
Binary file not shown.
@ -18,7 +18,7 @@ func TestDecomressOVA(t *testing.T) {
|
||||
assert.NoError(t, err)
|
||||
defer os.RemoveAll(td)
|
||||
|
||||
fixture := "../../packer-plugin-sdk/test-fixtures/decompress-tar/outside_parent.tar"
|
||||
fixture := "./test-fixtures/decompress-tar/outside_parent.tar"
|
||||
err = DecompressOva(td, fixture)
|
||||
assert.NoError(t, err)
|
||||
_, err = os.Stat(filepath.Join(filepath.Base(td), "demo.poc"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user