packer: shuffle some tests around to where they make more sense

This commit is contained in:
Mitchell Hashimoto 2013-08-15 15:45:34 -04:00
parent 063adf4bbb
commit ebea49bf89
2 changed files with 11 additions and 11 deletions

View File

@ -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{

View File

@ -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 := `
{ {