Skip to content

Commit 91ee184

Browse files
authored
Migrate to terraform-plugin-testing (#1256)
1 parent 94dde4f commit 91ee184

File tree

92 files changed

+160
-159
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+160
-159
lines changed

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ require (
1919
github.com/hashicorp/terraform-plugin-log v0.9.0
2020
github.com/hashicorp/terraform-plugin-mux v0.20.0
2121
github.com/hashicorp/terraform-plugin-sdk/v2 v2.37.0
22+
github.com/hashicorp/terraform-plugin-testing v1.13.3
2223
github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c
2324
github.com/oapi-codegen/runtime v1.1.2
2425
github.com/stretchr/testify v1.11.0

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,8 @@ github.com/hashicorp/terraform-plugin-mux v0.20.0 h1:3QpBnI9uCuL0Yy2Rq/kR9cOdmOF
621621
github.com/hashicorp/terraform-plugin-mux v0.20.0/go.mod h1:wSIZwJjSYk86NOTX3fKUlThMT4EAV1XpBHz9SAvjQr4=
622622
github.com/hashicorp/terraform-plugin-sdk/v2 v2.37.0 h1:NFPMacTrY/IdcIcnUB+7hsore1ZaRWU9cnB6jFoBnIM=
623623
github.com/hashicorp/terraform-plugin-sdk/v2 v2.37.0/go.mod h1:QYmYnLfsosrxjCnGY1p9c7Zj6n9thnEE+7RObeYs3fA=
624+
github.com/hashicorp/terraform-plugin-testing v1.13.3 h1:QLi/khB8Z0a5L54AfPrHukFpnwsGL8cwwswj4RZduCo=
625+
github.com/hashicorp/terraform-plugin-testing v1.13.3/go.mod h1:WHQ9FDdiLoneey2/QHpGM/6SAYf4A7AZazVg7230pLE=
624626
github.com/hashicorp/terraform-registry-address v0.2.5 h1:2GTftHqmUhVOeuu9CW3kwDkRe4pcBDq0uuK5VJngU1M=
625627
github.com/hashicorp/terraform-registry-address v0.2.5/go.mod h1:PpzXWINwB5kuVS5CA7m1+eO2f1jKb5ZDIxrOPfpnGkg=
626628
github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ=

internal/acctest/checks/resource_list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package checks
33
import (
44
"fmt"
55

6-
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
6+
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
77
)
88

99
func TestCheckResourceListAttr(name, key string, values []string) resource.TestCheckFunc {

internal/acctest/checks/user_auth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"io"
77

88
"github.com/elastic/terraform-provider-elasticstack/internal/clients"
9-
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
9+
"github.com/hashicorp/terraform-plugin-testing/terraform"
1010
)
1111

1212
func CheckUserCanAuthenticate(username string, password string) func(*terraform.State) error {

internal/apm/agent_configuration/resource_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55
"testing"
66

77
"github.com/elastic/terraform-provider-elasticstack/internal/acctest"
8-
tf_acctest "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
9-
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
8+
tf_acctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest"
9+
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
1010
)
1111

1212
func TestAccResourceAgentConfiguration(t *testing.T) {

internal/elasticsearch/cluster/cluster_info_data_source_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"testing"
55

66
"github.com/elastic/terraform-provider-elasticstack/internal/acctest"
7-
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
7+
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
88
)
99

1010
func TestAccDataSourceClusterInfo(t *testing.T) {

internal/elasticsearch/cluster/script_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import (
66

77
"github.com/elastic/terraform-provider-elasticstack/internal/acctest"
88
"github.com/elastic/terraform-provider-elasticstack/internal/clients"
9-
sdkacctest "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
10-
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
11-
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
9+
sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest"
10+
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
11+
"github.com/hashicorp/terraform-plugin-testing/terraform"
1212
"github.com/stretchr/testify/require"
1313
)
1414

internal/elasticsearch/cluster/settings_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77

88
"github.com/elastic/terraform-provider-elasticstack/internal/acctest"
99
"github.com/elastic/terraform-provider-elasticstack/internal/clients"
10-
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
11-
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
10+
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
11+
"github.com/hashicorp/terraform-plugin-testing/terraform"
1212
)
1313

1414
func TestAccResourceClusterSettings(t *testing.T) {

internal/elasticsearch/cluster/slm_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import (
66

77
"github.com/elastic/terraform-provider-elasticstack/internal/acctest"
88
"github.com/elastic/terraform-provider-elasticstack/internal/clients"
9-
sdkacctest "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
10-
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
11-
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
9+
sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest"
10+
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
11+
"github.com/hashicorp/terraform-plugin-testing/terraform"
1212
)
1313

1414
func TestAccResourceSLM(t *testing.T) {

internal/elasticsearch/cluster/snapshot_repository_data_source_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55
"testing"
66

77
"github.com/elastic/terraform-provider-elasticstack/internal/acctest"
8-
sdkacctest "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
9-
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
8+
sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest"
9+
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
1010
)
1111

1212
func TestAccDataSourceSnapRepoMissing(t *testing.T) {

0 commit comments

Comments
 (0)