Skip to content

Commit ac1c092

Browse files
appilonkmoe
authored andcommitted
wrap Verbose() helper in resource/testing
1 parent 71c6b0c commit ac1c092

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

helper/resource/testing.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212
"regexp"
1313
"strings"
1414
"syscall"
15-
gotesting "testing"
1615

1716
"github.com/hashicorp/go-multierror"
1817
"github.com/hashicorp/logutils"
@@ -540,7 +539,7 @@ func Test(t testing.T, c TestCase) {
540539
log.SetOutput(logWriter)
541540

542541
// We require verbose mode so that the user knows what is going on.
543-
if !gotesting.Verbose() && !c.IsUnitTest {
542+
if !testing.Verbose() && !c.IsUnitTest {
544543
t.Fatal("Acceptance tests must be run with the -v flag on tests")
545544
}
546545

helper/resource/testing/testing.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
// importers of the SDK
44
package testing
55

6+
import "testing"
7+
68
// T is the interface used to handle the test lifecycle of a test.
79
//
810
// Users should just use a *testing.T object, which implements this.
@@ -22,3 +24,10 @@ type T interface {
2224
type M interface {
2325
Run() int
2426
}
27+
28+
// Verbose just wraps the official testing package's helper of the same name.
29+
// This is the final reference to the testing package in non *_test.go files
30+
// in the SDK.
31+
func Verbose() bool {
32+
return testing.Verbose()
33+
}

0 commit comments

Comments
 (0)