Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bhcleek committed Oct 31, 2015
1 parent 23415b3 commit 5366393
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions provisioner/ansible/provisioner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func TestProvisionerPrepare_Defaults(t *testing.T) {
}
defer os.Remove(playbook_file.Name())

config["ssh_private_host_key_file"] = hostkey_file.Name()
config["ssh_host_key_file"] = hostkey_file.Name()
config["ssh_authorized_key_file"] = publickey_file.Name()
config["playbook_file"] = playbook_file.Name()
err = p.Prepare(config)
Expand All @@ -76,7 +76,7 @@ func TestProvisionerPrepare_PlaybookFile(t *testing.T) {
}
defer os.Remove(publickey_file.Name())

config["ssh_private_host_key_file"] = hostkey_file.Name()
config["ssh_host_key_file"] = hostkey_file.Name()
config["ssh_authorized_key_file"] = publickey_file.Name()

err = p.Prepare(config)
Expand Down Expand Up @@ -119,13 +119,13 @@ func TestProvisionerPrepare_HostKeyFile(t *testing.T) {
t.Fatal("could not create random file name")
}

config["ssh_private_host_key_file"] = fmt.Sprintf("%x", filename)
config["ssh_host_key_file"] = fmt.Sprintf("%x", filename)
config["ssh_authorized_key_file"] = publickey_file.Name()
config["playbook_file"] = playbook_file.Name()

err = p.Prepare(config)
if err == nil {
t.Fatal("should error if ssh_private_host_key_file does not exist")
t.Fatal("should error if ssh_host_key_file does not exist")
}

hostkey_file, err := ioutil.TempFile("", "hostkey")
Expand All @@ -134,7 +134,7 @@ func TestProvisionerPrepare_HostKeyFile(t *testing.T) {
}
defer os.Remove(hostkey_file.Name())

config["ssh_private_host_key_file"] = hostkey_file.Name()
config["ssh_host_key_file"] = hostkey_file.Name()
err = p.Prepare(config)
if err != nil {
t.Fatalf("err: %s", err)
Expand All @@ -157,7 +157,7 @@ func TestProvisionerPrepare_AuthorizedKeyFile(t *testing.T) {
}
defer os.Remove(playbook_file.Name())

config["ssh_private_host_key_file"] = hostkey_file.Name()
config["ssh_host_key_file"] = hostkey_file.Name()
config["playbook_file"] = playbook_file.Name()

err = p.Prepare(config)
Expand Down Expand Up @@ -200,7 +200,7 @@ func TestProvisionerPrepare_LocalPort(t *testing.T) {
}
defer os.Remove(playbook_file.Name())

config["ssh_private_host_key_file"] = hostkey_file.Name()
config["ssh_host_key_file"] = hostkey_file.Name()
config["ssh_authorized_key_file"] = publickey_file.Name()
config["playbook_file"] = playbook_file.Name()

Expand Down

0 comments on commit 5366393

Please sign in to comment.