Skip to content

Commit

Permalink
ensure panic comes from mockT
Browse files Browse the repository at this point in the history
  • Loading branch information
appilon committed Apr 22, 2020
1 parent cdd4c2d commit 7aef158
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion helper/resource/testing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,11 @@ func TestTest_factoryError(t *testing.T) {

func() {
defer func() {
recover()
if r := recover(); r != nil {
if !strings.HasPrefix(r.(string), "mockT") {
panic(r)
}
}
}()
Test(mt, TestCase{
ProviderFactories: map[string]terraform.ResourceProviderFactory{
Expand Down

0 comments on commit 7aef158

Please sign in to comment.