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,10 +9,9 @@ import (
)
func TestState_basic(t *testing.T) {
resource.Test(t, resource.TestCase{
OverrideEnvVar: true,
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
resource.UnitTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Steps: []resource.TestStep{
{
Config: testAccState_basic,
@ -26,10 +25,9 @@ func TestState_basic(t *testing.T) {
}
func TestState_complexOutputs(t *testing.T) {
resource.Test(t, resource.TestCase{
OverrideEnvVar: true,
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
resource.UnitTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Steps: []resource.TestStep{
{
Config: testAccState_complexOutputs,