actually check for errors in functional tests
This commit is contained in:
parent
da80c60e84
commit
049fb2d9c1
|
@ -252,7 +252,10 @@ func TestAnsibleGetVersion(t *testing.T) {
|
||||||
|
|
||||||
var p Provisioner
|
var p Provisioner
|
||||||
p.config.Command = "ansible-playbook"
|
p.config.Command = "ansible-playbook"
|
||||||
p.getVersion()
|
err := p.getVersion()
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("err: %s", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestAnsibleLongMessages(t *testing.T) {
|
func TestAnsibleLongMessages(t *testing.T) {
|
||||||
|
@ -263,7 +266,10 @@ func TestAnsibleLongMessages(t *testing.T) {
|
||||||
var p Provisioner
|
var p Provisioner
|
||||||
p.config.Command = "ansible-playbook"
|
p.config.Command = "ansible-playbook"
|
||||||
p.config.PlaybookFile = "./test-fixtures/long-debug-message.yml"
|
p.config.PlaybookFile = "./test-fixtures/long-debug-message.yml"
|
||||||
p.Prepare()
|
err := p.Prepare()
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("err: %s", err)
|
||||||
|
}
|
||||||
|
|
||||||
comm := &packer.MockCommunicator{}
|
comm := &packer.MockCommunicator{}
|
||||||
ui := &packer.BasicUi{
|
ui := &packer.BasicUi{
|
||||||
|
@ -271,5 +277,8 @@ func TestAnsibleLongMessages(t *testing.T) {
|
||||||
Writer: new(bytes.Buffer),
|
Writer: new(bytes.Buffer),
|
||||||
}
|
}
|
||||||
|
|
||||||
p.Provision(ui, comm)
|
err = p.Provision(ui, comm)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("err: %s", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue