Commit e7b7d71f authored by Kelsey Hightower's avatar Kelsey Hightower

Add tests for ansible provisioner default settings

parent 4d241b96
...@@ -20,6 +20,28 @@ func TestProvisioner_Impl(t *testing.T) { ...@@ -20,6 +20,28 @@ func TestProvisioner_Impl(t *testing.T) {
} }
} }
func TestProvisionerPrepare_Defaults(t *testing.T) {
var p Provisioner
config := testConfig()
playbook_file, err := ioutil.TempFile("", "playbook")
if err != nil {
t.Fatalf("err: %s", err)
}
defer os.Remove(playbook_file.Name())
config["playbook_file"] = playbook_file.Name()
err = p.Prepare(config)
if err != nil {
t.Fatalf("err: %s", err)
}
if p.config.StagingDir != DefaultStagingDir {
t.Fatalf("unexpected staging dir %s, expected %s",
p.config.StagingDir, DefaultStagingDir)
}
}
func TestProvisionerPrepare_PlaybookFile(t *testing.T) { func TestProvisionerPrepare_PlaybookFile(t *testing.T) {
var p Provisioner var p Provisioner
config := testConfig() config := testConfig()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment