helper/resource: Consolidate unit test override

I noticed we had two mechanisms for unit test override. One that dropped
a sentinel into the env var, and another with a struct member on
TestCase. This consolidates the two, using the cleaner struct member
internal mechanism and the nicer `resource.UnitTest()` entry point.
This commit is contained in:
Paul Hinze 2016-07-01 13:08:43 -05:00
parent fff30cc897
commit 8c741db144
1 changed files with 6 additions and 8 deletions

View File

@ -9,8 +9,7 @@ import (
)
func TestState_basic(t *testing.T) {
resource.Test(t, resource.TestCase{
OverrideEnvVar: true,
resource.UnitTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Steps: []resource.TestStep{
@ -26,8 +25,7 @@ func TestState_basic(t *testing.T) {
}
func TestState_complexOutputs(t *testing.T) {
resource.Test(t, resource.TestCase{
OverrideEnvVar: true,
resource.UnitTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Steps: []resource.TestStep{