Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mbode committed Sep 21, 2019
1 parent e118021 commit ee705c4
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions planner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ resource "null_resource" "second" {}`
{"null_resource.first", "null_resource", Change{[]changeAction{create}}},
{"null_resource.second", "null_resource", Change{[]changeAction{create}}},
}
if got, err := changes([]string{}); err != nil && !reflect.DeepEqual(got, want) {
got, err := changes([]string{})
if err != nil {
t.Fatalf("failed computing changes")
}
if !reflect.DeepEqual(got, want) {
t.Errorf("changes() = %q, want %q", got, want)
}
}
Expand All @@ -46,7 +50,11 @@ resource "null_resource" "second" {}`
{"null_resource.first", "null_resource", Change{[]changeAction{del}}},
{"null_resource.second", "null_resource", Change{[]changeAction{del}}},
}
if got, err := changes([]string{}); err != nil && !reflect.DeepEqual(got, want) {
got, err := changes([]string{})
if err != nil {
t.Fatalf("failed computing changes")
}
if !reflect.DeepEqual(got, want) {
t.Errorf("changes() = %q, want %q", got, want)
}
}
Expand Down Expand Up @@ -75,7 +83,11 @@ resource "null_resource" "second" {}`
}
}

if got, err := changes([]string{}); err != nil && !reflect.DeepEqual(got, want) {
got, err := changes([]string{})
if err != nil {
t.Fatalf("failed computing changes")
}
if !reflect.DeepEqual(got, want) {
t.Errorf("changes() = %q, want %q", got, want)
}
}
Expand Down

0 comments on commit ee705c4

Please sign in to comment.