From 49deb07e3595aa4123aa70a0063f74a74a501759 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Cobles?= <68897552+ocobles@users.noreply.github.com> Date: Thu, 18 Jan 2024 21:20:02 +0100 Subject: [PATCH] refactor: update tests to use new standalone terraform-plugin-testing module (#526) a go module was released last year to keep testing functionality separated from schema logic https://github.com/hashicorp/terraform-plugin-testing We need this replacement to use some functionality required to test migration from sdkv2 to framework, like plancheck https://developer.hashicorp.com/terraform/plugin/framework/migrating/testing#example Keeping both github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource and github.com/hashicorp/terraform-plugin-testing/helper/resource imports produces a panic error https://github.com/equinix/terraform-provider-equinix/pull/406#issuecomment-1897294576 so it is required to fully replace all Signed-off-by: ocobleseqx --- equinix/data_source_ecx_l2_sellerprofile_acc_test.go | 2 +- equinix/data_source_ecx_l2_sellerprofiles_acc_test.go | 4 ++-- equinix/data_source_ecx_port_acc_test.go | 2 +- equinix/data_source_metal_connection_acc_test.go | 4 ++-- equinix/data_source_metal_device_acc_test.go | 4 ++-- .../data_source_metal_device_bgp_neighbors_acc_test.go | 4 ++-- equinix/data_source_metal_devices_acc_test.go | 4 ++-- equinix/data_source_metal_facility_acc_test.go | 2 +- equinix/data_source_metal_gateway_acc_test.go | 2 +- equinix/data_source_metal_ip_block_ranges_acc_test.go | 4 ++-- equinix/data_source_metal_metro_acc_test.go | 2 +- equinix/data_source_metal_operating_system_acc_test.go | 2 +- equinix/data_source_metal_organization_acc_test.go | 4 ++-- equinix/data_source_metal_plans_acc_test.go | 2 +- equinix/data_source_metal_port_acc_test.go | 4 ++-- .../data_source_metal_precreated_ip_block_acc_test.go | 4 ++-- equinix/data_source_metal_project_acc_test.go | 4 ++-- .../data_source_metal_reserved_ip_block_acc_test.go | 4 ++-- .../data_source_metal_spot_market_price_acc_test.go | 2 +- .../data_source_metal_spot_market_request_acc_test.go | 6 +++--- equinix/data_source_metal_vlan_acc_test.go | 6 +++--- equinix/data_source_network_account_acc_test.go | 2 +- .../data_source_network_device_software_acc_test.go | 2 +- equinix/data_source_network_device_type_acc_test.go | 2 +- equinix/data_source_network_platform_acc_test.go | 2 +- equinix/equinix_sweeper_test.go | 2 +- equinix/provider_test.go | 2 +- equinix/resource_ecx_l2_connection_acc_test.go | 6 +++--- equinix/resource_ecx_l2_connection_test.go | 2 +- equinix/resource_ecx_l2_serviceprofile_acc_test.go | 6 +++--- equinix/resource_fabric_cloud_router_acc_test.go | 4 ++-- equinix/resource_fabric_connection_acc_test.go | 4 ++-- equinix/resource_fabric_port_acc_test.go | 2 +- equinix/resource_fabric_routing_protocol_acc_test.go | 4 ++-- equinix/resource_fabric_service_profile_acc_test.go | 4 ++-- equinix/resource_metal_bgp_setup_acc_test.go | 6 +++--- equinix/resource_metal_connection_acc_test.go | 6 +++--- equinix/resource_metal_device_acc_test.go | 6 +++--- equinix/resource_metal_gateway_acc_test.go | 4 ++-- equinix/resource_metal_ip_attachment_acc_test.go | 6 +++--- equinix/resource_metal_organization_acc_test.go | 6 +++--- equinix/resource_metal_organization_member_acc_test.go | 6 +++--- equinix/resource_metal_port_acc_test.go | 6 +++--- .../resource_metal_port_vlan_attachment_acc_test.go | 6 +++--- equinix/resource_metal_project_acc_test.go | 6 +++--- equinix/resource_metal_project_api_key_acc_test.go | 4 ++-- equinix/resource_metal_reserved_ip_block_acc_test.go | 10 ++++------ equinix/resource_metal_spot_market_request_acc_test.go | 6 +++--- equinix/resource_metal_user_api_key_acc_test.go | 2 +- equinix/resource_metal_virtual_circuit_acc_test.go | 6 +++--- equinix/resource_metal_vlan_acc_test.go | 6 +++--- equinix/resource_metal_vrf_acc_test.go | 6 +++--- equinix/resource_network_acl_template_acc_test.go | 6 +++--- equinix/resource_network_bgp_acc_test.go | 6 +++--- equinix/resource_network_device_acc_test.go | 6 +++--- equinix/resource_network_device_link_acc_test.go | 6 +++--- equinix/resource_network_file_acc_test.go | 6 +++--- equinix/resource_network_ssh_key_acc_test.go | 6 +++--- equinix/resource_network_ssh_user_acc_test.go | 4 ++-- go.mod | 1 + go.sum | 2 ++ internal/acceptance/acceptance.go | 2 +- internal/acceptance/ssh_key_helpers.go | 4 ++-- internal/errors/errors_test.go | 2 +- .../metal/metal_project_ssh_key/datasource_test.go | 4 ++-- .../metal/metal_project_ssh_key/resource_test.go | 6 +++--- .../resources/metal/metal_ssh_key/resource_test.go | 6 +++--- 67 files changed, 141 insertions(+), 140 deletions(-) diff --git a/equinix/data_source_ecx_l2_sellerprofile_acc_test.go b/equinix/data_source_ecx_l2_sellerprofile_acc_test.go index ba8566664..98839e4f4 100644 --- a/equinix/data_source_ecx_l2_sellerprofile_acc_test.go +++ b/equinix/data_source_ecx_l2_sellerprofile_acc_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) const tstL2SellerProfileEnvVar = "TF_ACC_ECX_SELLER_PROFILE_NAME" diff --git a/equinix/data_source_ecx_l2_sellerprofiles_acc_test.go b/equinix/data_source_ecx_l2_sellerprofiles_acc_test.go index aa0d1df29..96ceba238 100644 --- a/equinix/data_source_ecx_l2_sellerprofiles_acc_test.go +++ b/equinix/data_source_ecx_l2_sellerprofiles_acc_test.go @@ -5,8 +5,8 @@ import ( "strconv" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccDataSourceECXL2SellerProfiles_nameRegex(t *testing.T) { diff --git a/equinix/data_source_ecx_port_acc_test.go b/equinix/data_source_ecx_port_acc_test.go index 2f3f36b1b..ca1de42a2 100644 --- a/equinix/data_source_ecx_port_acc_test.go +++ b/equinix/data_source_ecx_port_acc_test.go @@ -5,8 +5,8 @@ import ( "regexp" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDataSourceFabricPort_basic(t *testing.T) { diff --git a/equinix/data_source_metal_connection_acc_test.go b/equinix/data_source_metal_connection_acc_test.go index 7bf7564ef..1a9a5f9b7 100644 --- a/equinix/data_source_metal_connection_acc_test.go +++ b/equinix/data_source_metal_connection_acc_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDataSourceMetalConnection_withoutVlans(t *testing.T) { diff --git a/equinix/data_source_metal_device_acc_test.go b/equinix/data_source_metal_device_acc_test.go index 101ca40ee..a735967dd 100644 --- a/equinix/data_source_metal_device_acc_test.go +++ b/equinix/data_source_metal_device_acc_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDataSourceMetalDevice_basic(t *testing.T) { diff --git a/equinix/data_source_metal_device_bgp_neighbors_acc_test.go b/equinix/data_source_metal_device_bgp_neighbors_acc_test.go index 5714ffee4..6b379e407 100644 --- a/equinix/data_source_metal_device_bgp_neighbors_acc_test.go +++ b/equinix/data_source_metal_device_bgp_neighbors_acc_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDataSourceMetalDeviceBgpNeighbors(t *testing.T) { diff --git a/equinix/data_source_metal_devices_acc_test.go b/equinix/data_source_metal_devices_acc_test.go index e783b5566..966515fbb 100644 --- a/equinix/data_source_metal_devices_acc_test.go +++ b/equinix/data_source_metal_devices_acc_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDataSourceMetalDevices(t *testing.T) { diff --git a/equinix/data_source_metal_facility_acc_test.go b/equinix/data_source_metal_facility_acc_test.go index 10097ffbc..b6d6a569f 100644 --- a/equinix/data_source_metal_facility_acc_test.go +++ b/equinix/data_source_metal_facility_acc_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) var ( diff --git a/equinix/data_source_metal_gateway_acc_test.go b/equinix/data_source_metal_gateway_acc_test.go index 8ab17623d..c800637f6 100644 --- a/equinix/data_source_metal_gateway_acc_test.go +++ b/equinix/data_source_metal_gateway_acc_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDataSourceMetalGateway_privateIPv4(t *testing.T) { diff --git a/equinix/data_source_metal_ip_block_ranges_acc_test.go b/equinix/data_source_metal_ip_block_ranges_acc_test.go index a00e45f2b..540bbd90c 100644 --- a/equinix/data_source_metal_ip_block_ranges_acc_test.go +++ b/equinix/data_source_metal_ip_block_ranges_acc_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDataSourceMetalIPBlockRanges_basic(t *testing.T) { diff --git a/equinix/data_source_metal_metro_acc_test.go b/equinix/data_source_metal_metro_acc_test.go index 9fd147696..d6cc7e4d4 100644 --- a/equinix/data_source_metal_metro_acc_test.go +++ b/equinix/data_source_metal_metro_acc_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDataSourceMetalMetro_basic(t *testing.T) { diff --git a/equinix/data_source_metal_operating_system_acc_test.go b/equinix/data_source_metal_operating_system_acc_test.go index 543f510b3..f37fff698 100644 --- a/equinix/data_source_metal_operating_system_acc_test.go +++ b/equinix/data_source_metal_operating_system_acc_test.go @@ -4,7 +4,7 @@ import ( "regexp" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDataSourceMetalOperatingSystem_basic(t *testing.T) { diff --git a/equinix/data_source_metal_organization_acc_test.go b/equinix/data_source_metal_organization_acc_test.go index e56745a98..54f0cf83b 100644 --- a/equinix/data_source_metal_organization_acc_test.go +++ b/equinix/data_source_metal_organization_acc_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/packethost/packngo" ) diff --git a/equinix/data_source_metal_plans_acc_test.go b/equinix/data_source_metal_plans_acc_test.go index a1dc6f574..6c6ffde6b 100644 --- a/equinix/data_source_metal_plans_acc_test.go +++ b/equinix/data_source_metal_plans_acc_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDataSourcePlans_Basic(t *testing.T) { diff --git a/equinix/data_source_metal_port_acc_test.go b/equinix/data_source_metal_port_acc_test.go index e037cb42f..e1bb975b5 100644 --- a/equinix/data_source_metal_port_acc_test.go +++ b/equinix/data_source_metal_port_acc_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDataSourceMetalPort_byName(t *testing.T) { diff --git a/equinix/data_source_metal_precreated_ip_block_acc_test.go b/equinix/data_source_metal_precreated_ip_block_acc_test.go index d2a586b1e..17444dbf4 100644 --- a/equinix/data_source_metal_precreated_ip_block_acc_test.go +++ b/equinix/data_source_metal_precreated_ip_block_acc_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDataSourceMetalPreCreatedIPBlock_basic(t *testing.T) { diff --git a/equinix/data_source_metal_project_acc_test.go b/equinix/data_source_metal_project_acc_test.go index d33ba1432..f7c394128 100644 --- a/equinix/data_source_metal_project_acc_test.go +++ b/equinix/data_source_metal_project_acc_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/packethost/packngo" ) diff --git a/equinix/data_source_metal_reserved_ip_block_acc_test.go b/equinix/data_source_metal_reserved_ip_block_acc_test.go index 59edf0797..e873ff73a 100644 --- a/equinix/data_source_metal_reserved_ip_block_acc_test.go +++ b/equinix/data_source_metal_reserved_ip_block_acc_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func testAccDataSourceMetalReservedIPBlockConfig_basic(name string) string { diff --git a/equinix/data_source_metal_spot_market_price_acc_test.go b/equinix/data_source_metal_spot_market_price_acc_test.go index 79f2ccbfb..889fc247c 100644 --- a/equinix/data_source_metal_spot_market_price_acc_test.go +++ b/equinix/data_source_metal_spot_market_price_acc_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDataSourceMetalSpotMarketPrice_basic(t *testing.T) { diff --git a/equinix/data_source_metal_spot_market_request_acc_test.go b/equinix/data_source_metal_spot_market_request_acc_test.go index 4820fd950..e4db15003 100644 --- a/equinix/data_source_metal_spot_market_request_acc_test.go +++ b/equinix/data_source_metal_spot_market_request_acc_test.go @@ -4,9 +4,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/packethost/packngo" ) diff --git a/equinix/data_source_metal_vlan_acc_test.go b/equinix/data_source_metal_vlan_acc_test.go index e8027ff06..95188a4c7 100644 --- a/equinix/data_source_metal_vlan_acc_test.go +++ b/equinix/data_source_metal_vlan_acc_test.go @@ -7,9 +7,9 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/config" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/packethost/packngo" ) diff --git a/equinix/data_source_network_account_acc_test.go b/equinix/data_source_network_account_acc_test.go index ae8691a7e..07f9549fb 100644 --- a/equinix/data_source_network_account_acc_test.go +++ b/equinix/data_source_network_account_acc_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDataSourceNetworkAccount_basic(t *testing.T) { diff --git a/equinix/data_source_network_device_software_acc_test.go b/equinix/data_source_network_device_software_acc_test.go index ad484b768..ea402ac77 100644 --- a/equinix/data_source_network_device_software_acc_test.go +++ b/equinix/data_source_network_device_software_acc_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDataSourceNetworkDeviceSoftware_versionRegex(t *testing.T) { diff --git a/equinix/data_source_network_device_type_acc_test.go b/equinix/data_source_network_device_type_acc_test.go index ce2937f65..b0be77e58 100644 --- a/equinix/data_source_network_device_type_acc_test.go +++ b/equinix/data_source_network_device_type_acc_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDataSourceNetworkDeviceType_basic(t *testing.T) { diff --git a/equinix/data_source_network_platform_acc_test.go b/equinix/data_source_network_platform_acc_test.go index 0e03c7fa9..482e93a86 100644 --- a/equinix/data_source_network_platform_acc_test.go +++ b/equinix/data_source_network_platform_acc_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDataSourceNetworkDevicePlatform_basic(t *testing.T) { diff --git a/equinix/equinix_sweeper_test.go b/equinix/equinix_sweeper_test.go index 3cfcd1f32..b37a0ed4b 100644 --- a/equinix/equinix_sweeper_test.go +++ b/equinix/equinix_sweeper_test.go @@ -9,7 +9,7 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/config" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) const tstResourcePrefix = "tfacc" diff --git a/equinix/provider_test.go b/equinix/provider_test.go index 8bd3cb9cc..e70ea2a3d 100644 --- a/equinix/provider_test.go +++ b/equinix/provider_test.go @@ -12,8 +12,8 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/hashcode" "github.com/equinix/ecx-go/v2" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/stretchr/testify/assert" ) diff --git a/equinix/resource_ecx_l2_connection_acc_test.go b/equinix/resource_ecx_l2_connection_acc_test.go index 63389580e..490dbfa43 100644 --- a/equinix/resource_ecx_l2_connection_acc_test.go +++ b/equinix/resource_ecx_l2_connection_acc_test.go @@ -12,10 +12,10 @@ import ( "github.com/equinix/ecx-go/v2" "github.com/equinix/rest-go" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) const ( diff --git a/equinix/resource_ecx_l2_connection_test.go b/equinix/resource_ecx_l2_connection_test.go index 90c6cc3da..77124d39b 100644 --- a/equinix/resource_ecx_l2_connection_test.go +++ b/equinix/resource_ecx_l2_connection_test.go @@ -6,8 +6,8 @@ import ( "github.com/equinix/ecx-go/v2" "github.com/equinix/terraform-provider-equinix/internal/converters" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" "github.com/stretchr/testify/assert" ) diff --git a/equinix/resource_ecx_l2_serviceprofile_acc_test.go b/equinix/resource_ecx_l2_serviceprofile_acc_test.go index fb3404fb9..8d2605a20 100644 --- a/equinix/resource_ecx_l2_serviceprofile_acc_test.go +++ b/equinix/resource_ecx_l2_serviceprofile_acc_test.go @@ -7,10 +7,10 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/config" "github.com/equinix/ecx-go/v2" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccFabricL2ServiceProfile_Private(t *testing.T) { diff --git a/equinix/resource_fabric_cloud_router_acc_test.go b/equinix/resource_fabric_cloud_router_acc_test.go index d2e9a2930..a59a36c7d 100644 --- a/equinix/resource_fabric_cloud_router_acc_test.go +++ b/equinix/resource_fabric_cloud_router_acc_test.go @@ -8,8 +8,8 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/config" v4 "github.com/equinix-labs/fabric-go/fabric/v4" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccCloudRouterCreate(t *testing.T) { diff --git a/equinix/resource_fabric_connection_acc_test.go b/equinix/resource_fabric_connection_acc_test.go index adb3394da..27cd7df40 100644 --- a/equinix/resource_fabric_connection_acc_test.go +++ b/equinix/resource_fabric_connection_acc_test.go @@ -8,8 +8,8 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/config" v4 "github.com/equinix-labs/fabric-go/fabric/v4" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccFabricCreateConnection(t *testing.T) { diff --git a/equinix/resource_fabric_port_acc_test.go b/equinix/resource_fabric_port_acc_test.go index 3b46b3f6c..ddced4618 100644 --- a/equinix/resource_fabric_port_acc_test.go +++ b/equinix/resource_fabric_port_acc_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccFabricReadPort(t *testing.T) { diff --git a/equinix/resource_fabric_routing_protocol_acc_test.go b/equinix/resource_fabric_routing_protocol_acc_test.go index af4af24ba..08f7833b7 100644 --- a/equinix/resource_fabric_routing_protocol_acc_test.go +++ b/equinix/resource_fabric_routing_protocol_acc_test.go @@ -8,8 +8,8 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/config" v4 "github.com/equinix-labs/fabric-go/fabric/v4" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccFabricCreateDirectRoutingProtocol(t *testing.T) { diff --git a/equinix/resource_fabric_service_profile_acc_test.go b/equinix/resource_fabric_service_profile_acc_test.go index 59aa9d224..ec860aec3 100644 --- a/equinix/resource_fabric_service_profile_acc_test.go +++ b/equinix/resource_fabric_service_profile_acc_test.go @@ -9,9 +9,9 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/config" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" v4 "github.com/equinix-labs/fabric-go/fabric/v4" ) diff --git a/equinix/resource_metal_bgp_setup_acc_test.go b/equinix/resource_metal_bgp_setup_acc_test.go index 32c4189a3..6e2cb9395 100644 --- a/equinix/resource_metal_bgp_setup_acc_test.go +++ b/equinix/resource_metal_bgp_setup_acc_test.go @@ -6,9 +6,9 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/config" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccMetalBGPSetup_basic(t *testing.T) { diff --git a/equinix/resource_metal_connection_acc_test.go b/equinix/resource_metal_connection_acc_test.go index 7a5146dc3..74d751b51 100644 --- a/equinix/resource_metal_connection_acc_test.go +++ b/equinix/resource_metal_connection_acc_test.go @@ -6,9 +6,9 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/config" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) const ( diff --git a/equinix/resource_metal_device_acc_test.go b/equinix/resource_metal_device_acc_test.go index bc3bbb3bc..f403dc8be 100644 --- a/equinix/resource_metal_device_acc_test.go +++ b/equinix/resource_metal_device_acc_test.go @@ -16,10 +16,10 @@ import ( "github.com/equinix/equinix-sdk-go/services/metalv1" "github.com/google/uuid" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) // list of plans and metros and os used as filter criteria to find available hardware to run tests diff --git a/equinix/resource_metal_gateway_acc_test.go b/equinix/resource_metal_gateway_acc_test.go index 0a73093ad..bf87955d2 100644 --- a/equinix/resource_metal_gateway_acc_test.go +++ b/equinix/resource_metal_gateway_acc_test.go @@ -6,8 +6,8 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/config" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccMetalGateway_privateIPv4(t *testing.T) { diff --git a/equinix/resource_metal_ip_attachment_acc_test.go b/equinix/resource_metal_ip_attachment_acc_test.go index eca1f8249..2e60b2a36 100644 --- a/equinix/resource_metal_ip_attachment_acc_test.go +++ b/equinix/resource_metal_ip_attachment_acc_test.go @@ -6,9 +6,9 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/config" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccMetalIPAttachment_basic(t *testing.T) { diff --git a/equinix/resource_metal_organization_acc_test.go b/equinix/resource_metal_organization_acc_test.go index 97798e82e..d57fad924 100644 --- a/equinix/resource_metal_organization_acc_test.go +++ b/equinix/resource_metal_organization_acc_test.go @@ -8,9 +8,9 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/config" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/packethost/packngo" ) diff --git a/equinix/resource_metal_organization_member_acc_test.go b/equinix/resource_metal_organization_member_acc_test.go index 1a776eb28..631095412 100644 --- a/equinix/resource_metal_organization_member_acc_test.go +++ b/equinix/resource_metal_organization_member_acc_test.go @@ -4,9 +4,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/packethost/packngo" ) diff --git a/equinix/resource_metal_port_acc_test.go b/equinix/resource_metal_port_acc_test.go index 68e7ce39f..113dbe694 100644 --- a/equinix/resource_metal_port_acc_test.go +++ b/equinix/resource_metal_port_acc_test.go @@ -7,10 +7,10 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/config" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/packethost/packngo" ) diff --git a/equinix/resource_metal_port_vlan_attachment_acc_test.go b/equinix/resource_metal_port_vlan_attachment_acc_test.go index de96c4bdc..4cf746d4e 100644 --- a/equinix/resource_metal_port_vlan_attachment_acc_test.go +++ b/equinix/resource_metal_port_vlan_attachment_acc_test.go @@ -8,9 +8,9 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/config" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func testAccMetalPortVlanAttachmentConfig_L2Bonded_1(name string) string { diff --git a/equinix/resource_metal_project_acc_test.go b/equinix/resource_metal_project_acc_test.go index b891bfce2..5b776f8b7 100644 --- a/equinix/resource_metal_project_acc_test.go +++ b/equinix/resource_metal_project_acc_test.go @@ -11,10 +11,10 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/config" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/packethost/packngo" ) diff --git a/equinix/resource_metal_project_api_key_acc_test.go b/equinix/resource_metal_project_api_key_acc_test.go index 7c2d9e713..4766992fb 100644 --- a/equinix/resource_metal_project_api_key_acc_test.go +++ b/equinix/resource_metal_project_api_key_acc_test.go @@ -6,8 +6,8 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/config" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccMetalProjectAPIKey_basic(t *testing.T) { diff --git a/equinix/resource_metal_reserved_ip_block_acc_test.go b/equinix/resource_metal_reserved_ip_block_acc_test.go index 40d4cded3..7fc92f570 100644 --- a/equinix/resource_metal_reserved_ip_block_acc_test.go +++ b/equinix/resource_metal_reserved_ip_block_acc_test.go @@ -9,14 +9,12 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/config" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) -var ( - matchIpBlockErrTimeout = regexp.MustCompile(".* timeout while waiting for state to become 'created'.*") -) +var matchIpBlockErrTimeout = regexp.MustCompile(".* timeout while waiting for state to become 'created'.*") func testAccMetalReservedIPBlockConfig_global(name string) string { return fmt.Sprintf(` diff --git a/equinix/resource_metal_spot_market_request_acc_test.go b/equinix/resource_metal_spot_market_request_acc_test.go index 2d273bf14..9df571405 100644 --- a/equinix/resource_metal_spot_market_request_acc_test.go +++ b/equinix/resource_metal_spot_market_request_acc_test.go @@ -6,9 +6,9 @@ import ( "testing" "github.com/equinix/terraform-provider-equinix/internal/config" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/packethost/packngo" ) diff --git a/equinix/resource_metal_user_api_key_acc_test.go b/equinix/resource_metal_user_api_key_acc_test.go index 831995a2e..409d1e0e1 100644 --- a/equinix/resource_metal_user_api_key_acc_test.go +++ b/equinix/resource_metal_user_api_key_acc_test.go @@ -5,7 +5,7 @@ import ( "log" "net/http" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" // "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) diff --git a/equinix/resource_metal_virtual_circuit_acc_test.go b/equinix/resource_metal_virtual_circuit_acc_test.go index 94c4b7240..c1c4ddfd8 100644 --- a/equinix/resource_metal_virtual_circuit_acc_test.go +++ b/equinix/resource_metal_virtual_circuit_acc_test.go @@ -8,9 +8,9 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/config" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/packethost/packngo" ) diff --git a/equinix/resource_metal_vlan_acc_test.go b/equinix/resource_metal_vlan_acc_test.go index eb76aa895..d40e4f94d 100644 --- a/equinix/resource_metal_vlan_acc_test.go +++ b/equinix/resource_metal_vlan_acc_test.go @@ -7,9 +7,9 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/config" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/packethost/packngo" ) diff --git a/equinix/resource_metal_vrf_acc_test.go b/equinix/resource_metal_vrf_acc_test.go index 5a1b481a5..5bfa38b96 100644 --- a/equinix/resource_metal_vrf_acc_test.go +++ b/equinix/resource_metal_vrf_acc_test.go @@ -9,9 +9,9 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/config" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/packethost/packngo" ) diff --git a/equinix/resource_network_acl_template_acc_test.go b/equinix/resource_network_acl_template_acc_test.go index 317587a25..d6f0eee3a 100644 --- a/equinix/resource_network_acl_template_acc_test.go +++ b/equinix/resource_network_acl_template_acc_test.go @@ -9,9 +9,9 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/config" "github.com/equinix/ne-go" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func init() { diff --git a/equinix/resource_network_bgp_acc_test.go b/equinix/resource_network_bgp_acc_test.go index 080f9a8b4..e860ad692 100644 --- a/equinix/resource_network_bgp_acc_test.go +++ b/equinix/resource_network_bgp_acc_test.go @@ -7,10 +7,10 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/config" "github.com/equinix/ne-go" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccNetworkBGP_CSR1000V_Single_AWS(t *testing.T) { diff --git a/equinix/resource_network_device_acc_test.go b/equinix/resource_network_device_acc_test.go index a8f534c24..86063f930 100644 --- a/equinix/resource_network_device_acc_test.go +++ b/equinix/resource_network_device_acc_test.go @@ -9,10 +9,10 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/config" "github.com/equinix/ne-go" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) const ( diff --git a/equinix/resource_network_device_link_acc_test.go b/equinix/resource_network_device_link_acc_test.go index 2069234cc..36fbf383d 100644 --- a/equinix/resource_network_device_link_acc_test.go +++ b/equinix/resource_network_device_link_acc_test.go @@ -9,10 +9,10 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/config" "github.com/equinix/ne-go" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func init() { diff --git a/equinix/resource_network_file_acc_test.go b/equinix/resource_network_file_acc_test.go index d848ec189..303f4e448 100644 --- a/equinix/resource_network_file_acc_test.go +++ b/equinix/resource_network_file_acc_test.go @@ -7,9 +7,9 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/config" "github.com/equinix/ne-go" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccNetworkFile_VSRX(t *testing.T) { diff --git a/equinix/resource_network_ssh_key_acc_test.go b/equinix/resource_network_ssh_key_acc_test.go index 4ef12531c..b27de199a 100644 --- a/equinix/resource_network_ssh_key_acc_test.go +++ b/equinix/resource_network_ssh_key_acc_test.go @@ -9,9 +9,9 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/config" "github.com/equinix/ne-go" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func init() { diff --git a/equinix/resource_network_ssh_user_acc_test.go b/equinix/resource_network_ssh_user_acc_test.go index 5a0eb9106..0ac24bde3 100644 --- a/equinix/resource_network_ssh_user_acc_test.go +++ b/equinix/resource_network_ssh_user_acc_test.go @@ -8,8 +8,8 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/config" "github.com/equinix/ne-go" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) // SSH User acc tests are in Device acc test tests diff --git a/go.mod b/go.mod index 1798732c5..3316f1544 100644 --- a/go.mod +++ b/go.mod @@ -17,6 +17,7 @@ require ( github.com/hashicorp/go-retryablehttp v0.7.5 github.com/hashicorp/terraform-plugin-docs v0.16.0 github.com/hashicorp/terraform-plugin-sdk/v2 v2.31.0 + github.com/hashicorp/terraform-plugin-testing v1.6.0 github.com/packethost/packngo v0.30.0 github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.8.4 diff --git a/go.sum b/go.sum index 97893f1a0..2a9dca944 100644 --- a/go.sum +++ b/go.sum @@ -439,6 +439,8 @@ github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9T github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= github.com/hashicorp/terraform-plugin-sdk/v2 v2.31.0 h1:Bl3e2ei2j/Z3Hc2HIS15Gal2KMKyLAZ2om1HCEvK6es= github.com/hashicorp/terraform-plugin-sdk/v2 v2.31.0/go.mod h1:i2C41tszDjiWfziPQDL5R/f3Zp0gahXe5No/MIO9rCE= +github.com/hashicorp/terraform-plugin-testing v1.6.0 h1:Wsnfh+7XSVRfwcr2jZYHsnLOnZl7UeaOBvsx6dl/608= +github.com/hashicorp/terraform-plugin-testing v1.6.0/go.mod h1:cJGG0/8j9XhHaJZRC+0sXFI4uzqQZ9Az4vh6C4GJpFE= github.com/hashicorp/terraform-registry-address v0.2.3 h1:2TAiKJ1A3MAkZlH1YI/aTVcLZRu7JseiXNRHbOAyoTI= github.com/hashicorp/terraform-registry-address v0.2.3/go.mod h1:lFHA76T8jfQteVfT7caREqguFrW3c4MFSPhZB7HHgUM= github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ= diff --git a/internal/acceptance/acceptance.go b/internal/acceptance/acceptance.go index 733db94c1..492ed85b9 100644 --- a/internal/acceptance/acceptance.go +++ b/internal/acceptance/acceptance.go @@ -11,8 +11,8 @@ import ( "github.com/equinix/terraform-provider-equinix/equinix" "github.com/equinix/terraform-provider-equinix/internal/config" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) const ( diff --git a/internal/acceptance/ssh_key_helpers.go b/internal/acceptance/ssh_key_helpers.go index 75606c896..90f1a918f 100644 --- a/internal/acceptance/ssh_key_helpers.go +++ b/internal/acceptance/ssh_key_helpers.go @@ -4,8 +4,8 @@ import ( "fmt" "github.com/equinix/terraform-provider-equinix/internal/config" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/packethost/packngo" ) diff --git a/internal/errors/errors_test.go b/internal/errors/errors_test.go index b2f9d283f..55f3d9c14 100644 --- a/internal/errors/errors_test.go +++ b/internal/errors/errors_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/equinix/rest-go" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" "github.com/stretchr/testify/assert" ) diff --git a/internal/resources/metal/metal_project_ssh_key/datasource_test.go b/internal/resources/metal/metal_project_ssh_key/datasource_test.go index d950f0708..97ff3c3c4 100644 --- a/internal/resources/metal/metal_project_ssh_key/datasource_test.go +++ b/internal/resources/metal/metal_project_ssh_key/datasource_test.go @@ -5,8 +5,8 @@ import ( "regexp" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/equinix/terraform-provider-equinix/internal/acceptance" ) diff --git a/internal/resources/metal/metal_project_ssh_key/resource_test.go b/internal/resources/metal/metal_project_ssh_key/resource_test.go index 6054d2eb2..827b99953 100644 --- a/internal/resources/metal/metal_project_ssh_key/resource_test.go +++ b/internal/resources/metal/metal_project_ssh_key/resource_test.go @@ -7,9 +7,9 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/config" "github.com/equinix/terraform-provider-equinix/internal/acceptance" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/packethost/packngo" ) diff --git a/internal/resources/metal/metal_ssh_key/resource_test.go b/internal/resources/metal/metal_ssh_key/resource_test.go index 14659fff0..3860e87d7 100644 --- a/internal/resources/metal/metal_ssh_key/resource_test.go +++ b/internal/resources/metal/metal_ssh_key/resource_test.go @@ -9,9 +9,9 @@ import ( "github.com/equinix/terraform-provider-equinix/internal/acceptance" "github.com/equinix/terraform-provider-equinix/internal/config" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/packethost/packngo" )