Skip to content

Commit

Permalink
Mark the tests as resource.UnitTest
Browse files Browse the repository at this point in the history
Since this provider does not interact with external services, it's safe
to run its tests as part of a normal unit testing pass, rather than
requiring acceptance testing mode.
  • Loading branch information
apparentlymart committed Sep 7, 2017
1 parent 339461a commit 5432b98
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion random/resource_id_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type idLens struct {
}

func TestAccResourceID(t *testing.T) {
resource.Test(t, resource.TestCase{
resource.UnitTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Steps: []resource.TestStep{
Expand Down
8 changes: 4 additions & 4 deletions random/resource_pet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

func TestAccResourcePet_basic(t *testing.T) {
resource.Test(t, resource.TestCase{
resource.UnitTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Steps: []resource.TestStep{
Expand All @@ -26,7 +26,7 @@ func TestAccResourcePet_basic(t *testing.T) {
}

func TestAccResourcePet_length(t *testing.T) {
resource.Test(t, resource.TestCase{
resource.UnitTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Steps: []resource.TestStep{
Expand All @@ -41,7 +41,7 @@ func TestAccResourcePet_length(t *testing.T) {
}

func TestAccResourcePet_prefix(t *testing.T) {
resource.Test(t, resource.TestCase{
resource.UnitTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Steps: []resource.TestStep{
Expand All @@ -58,7 +58,7 @@ func TestAccResourcePet_prefix(t *testing.T) {
}

func TestAccResourcePet_separator(t *testing.T) {
resource.Test(t, resource.TestCase{
resource.UnitTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Steps: []resource.TestStep{
Expand Down
2 changes: 1 addition & 1 deletion random/resource_shuffle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

func TestAccResourceShuffle(t *testing.T) {
resource.Test(t, resource.TestCase{
resource.UnitTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Steps: []resource.TestStep{
Expand Down
2 changes: 1 addition & 1 deletion random/resource_string_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type customLens struct {
}

func TestAccResourceString(t *testing.T) {
resource.Test(t, resource.TestCase{
resource.UnitTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Steps: []resource.TestStep{
Expand Down

0 comments on commit 5432b98

Please sign in to comment.