packer: shuffle some tests around to where they make more sense
This commit is contained in:
parent
063adf4bbb
commit
ebea49bf89
|
@ -17,6 +17,17 @@ func init() {
|
||||||
log.SetOutput(ioutil.Discard)
|
log.SetOutput(ioutil.Discard)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func testComponentFinder() *ComponentFinder {
|
||||||
|
builderFactory := func(n string) (Builder, error) { return testBuilder(), nil }
|
||||||
|
ppFactory := func(n string) (PostProcessor, error) { return new(TestPostProcessor), nil }
|
||||||
|
provFactory := func(n string) (Provisioner, error) { return new(TestProvisioner), nil }
|
||||||
|
return &ComponentFinder{
|
||||||
|
Builder: builderFactory,
|
||||||
|
PostProcessor: ppFactory,
|
||||||
|
Provisioner: provFactory,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func testEnvironment() Environment {
|
func testEnvironment() Environment {
|
||||||
config := DefaultEnvironmentConfig()
|
config := DefaultEnvironmentConfig()
|
||||||
config.Ui = &BasicUi{
|
config.Ui = &BasicUi{
|
||||||
|
|
|
@ -9,17 +9,6 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
func testComponentFinder() *ComponentFinder {
|
|
||||||
builderFactory := func(n string) (Builder, error) { return testBuilder(), nil }
|
|
||||||
ppFactory := func(n string) (PostProcessor, error) { return new(TestPostProcessor), nil }
|
|
||||||
provFactory := func(n string) (Provisioner, error) { return new(TestProvisioner), nil }
|
|
||||||
return &ComponentFinder{
|
|
||||||
Builder: builderFactory,
|
|
||||||
PostProcessor: ppFactory,
|
|
||||||
Provisioner: provFactory,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestParseTemplateFile_basic(t *testing.T) {
|
func TestParseTemplateFile_basic(t *testing.T) {
|
||||||
data := `
|
data := `
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue