From 9ca7566219f71943056e1bb49b8a515bc87d8d17 Mon Sep 17 00:00:00 2001 From: Haroon-Dweikat-Ntx Date: Tue, 10 Dec 2024 13:13:32 +0200 Subject: [PATCH] change the name of test case's from TestAccNutanix.. to TestAccV2Nutanix.. --- ...source_nutanix_cluster_entities_v2_test.go | 6 +-- ...a_source_nutanix_cluster_entity_v2_test.go | 2 +- ...ta_source_nutanix_host_entities_v2_test.go | 4 +- .../data_source_nutanix_host_entity_v2.go | 3 -- ...data_source_nutanix_host_entity_v2_test.go | 6 +-- ...ter_discover_unconfigured_nodes_v2_test.go | 2 +- ...resource_nutanix_cluster_entity_v2_test.go | 46 +++++++++---------- .../data_source_nutanix_recovery_point_v2.go | 4 +- ...a_source_nutanix_recovery_point_v2_test.go | 2 +- ..._source_nutanix_recovery_points_v2_test.go | 6 +-- ...ource_nutanix_vm_recovery_point_info_v2.go | 3 ++ ...tanix_recovery_points_replicate_v2_test.go | 2 +- ...nutanix_recovery_points_restore_v2_test.go | 2 +- ...esource_nutanix_recovery_points_v2_test.go | 16 +++---- ..._nutanix_authorization_policies_v2_test.go | 7 +-- ...ce_nutanix_authorization_policy_v2_test.go | 3 +- ...ource_nutanix_directory_service_v2_test.go | 2 +- ...urce_nutanix_directory_services_v2_test.go | 6 +-- .../data_source_nutanix_operation_v2_test.go | 2 +- .../data_source_nutanix_operations_v2_test.go | 4 +- .../iamv2/data_source_nutanix_role_v2_test.go | 2 +- .../data_source_nutanix_roles_v2_test.go | 6 +-- .../data_source_nutanix_saml_idp_v2_test.go | 2 +- .../data_source_nutanix_saml_idps_v2_test.go | 6 +-- .../data_source_nutanix_user_group_v2_test.go | 2 +- .../iamv2/datasource_nutanix_user_v2_test.go | 2 +- .../iamv2/datasource_nutanix_users_v2_test.go | 6 +-- ..._nutanix_authorization_policies_v2_test.go | 10 ++-- ...urce_nutanix_directory_services_v2_test.go | 16 +++---- .../iamv2/resource_nutanix_roles_v2_test.go | 8 ++-- .../resource_nutanix_saml_idp_v2_test.go | 6 +-- .../resource_nutanix_user_groups_v2_test.go | 8 ++-- .../iamv2/resource_nutanix_users_v2_test.go | 16 +++---- .../data_source_nutanix_categories_v2_test.go | 6 +-- .../data_source_nutanix_category_v2_test.go | 2 +- .../resource_nutanix_categories_v2_test.go | 6 +-- ...ce_nutanix_storage_container_stats_test.go | 12 ++--- ...ta_source_nutanix_storge_container_test.go | 2 +- ...a_source_nutanix_storge_containers_test.go | 6 +-- ...resource_nutanix_storge_containers_test.go | 6 +-- ...nutanix_volume_category_details_v2_test.go | 2 +- ...data_source_nutanix_volume_disk_v2_test.go | 2 +- ...ata_source_nutanix_volume_disks_v2_test.go | 4 +- ...anix_volume_group_iscsi_clients_v2_test.go | 2 +- ...ata_source_nutanix_volume_group_v2_test.go | 2 +- ...source_nutanix_volume_group_vms_v2_test.go | 2 +- ...ta_source_nutanix_volume_groups_v2_test.go | 6 +-- ...rce_nutanix_volume_iscsi_client_v2_test.go | 2 +- ...ce_nutanix_volume_iscsi_clients_v2_test.go | 2 +- ...ource_nutanix_volume_group_disk_v2_test.go | 2 +- ...tanix_volume_group_iscsi_client_v2_test.go | 2 +- .../resource_nutanix_volume_group_v2_test.go | 8 ++-- ...esource_nutanix_volume_group_vm_v2_test.go | 2 +- 53 files changed, 149 insertions(+), 147 deletions(-) diff --git a/nutanix/services/clustersv2/data_source_nutanix_cluster_entities_v2_test.go b/nutanix/services/clustersv2/data_source_nutanix_cluster_entities_v2_test.go index 8dfe5995e..3053afde6 100644 --- a/nutanix/services/clustersv2/data_source_nutanix_cluster_entities_v2_test.go +++ b/nutanix/services/clustersv2/data_source_nutanix_cluster_entities_v2_test.go @@ -9,7 +9,7 @@ import ( const dataSourceNameClusters = "data.nutanix_clusters_v2.test" -func TestAccNutanixClustersV2DataSource_basic(t *testing.T) { +func TestAccV2NutanixClustersDataSource_basic(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -24,7 +24,7 @@ func TestAccNutanixClustersV2DataSource_basic(t *testing.T) { }) } -func TestAccNutanixClustersV2DataSource_filter(t *testing.T) { +func TestAccV2NutanixClustersDataSource_filter(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -40,7 +40,7 @@ func TestAccNutanixClustersV2DataSource_filter(t *testing.T) { }) } -func TestAccNutanixClustersV2DataSource_limit(t *testing.T) { +func TestAccV2NutanixClustersDataSource_limit(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, diff --git a/nutanix/services/clustersv2/data_source_nutanix_cluster_entity_v2_test.go b/nutanix/services/clustersv2/data_source_nutanix_cluster_entity_v2_test.go index 9c91612c2..61830c85e 100644 --- a/nutanix/services/clustersv2/data_source_nutanix_cluster_entity_v2_test.go +++ b/nutanix/services/clustersv2/data_source_nutanix_cluster_entity_v2_test.go @@ -9,7 +9,7 @@ import ( const dataSourceNameCluster = "data.nutanix_cluster_v2.test" -func TestAccNutanixClusterV2DataSource_basic(t *testing.T) { +func TestAccV2NutanixClusterDataSource_basic(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, diff --git a/nutanix/services/clustersv2/data_source_nutanix_host_entities_v2_test.go b/nutanix/services/clustersv2/data_source_nutanix_host_entities_v2_test.go index 9d0d023fb..b63fd5b4c 100644 --- a/nutanix/services/clustersv2/data_source_nutanix_host_entities_v2_test.go +++ b/nutanix/services/clustersv2/data_source_nutanix_host_entities_v2_test.go @@ -9,7 +9,7 @@ import ( const datasourceNameHostEntities = "data.nutanix_hosts_v2.test" -func TestAccNutanixHostEntitiesV2Datasource_Basic(t *testing.T) { +func TestAccV2NutanixHostEntitiesDatasource_Basic(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -25,7 +25,7 @@ func TestAccNutanixHostEntitiesV2Datasource_Basic(t *testing.T) { }) } -func TestAccNutanixHostEntitiesV2Datasource_WithLimit(t *testing.T) { +func TestAccV2NutanixHostEntitiesDatasource_WithLimit(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, diff --git a/nutanix/services/clustersv2/data_source_nutanix_host_entity_v2.go b/nutanix/services/clustersv2/data_source_nutanix_host_entity_v2.go index ed0b508be..002874a7b 100644 --- a/nutanix/services/clustersv2/data_source_nutanix_host_entity_v2.go +++ b/nutanix/services/clustersv2/data_source_nutanix_host_entity_v2.go @@ -2,8 +2,6 @@ package clustersv2 import ( "context" - "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" import1 "github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config" @@ -356,7 +354,6 @@ func DatasourceNutanixHostEntityV2Read(ctx context.Context, d *schema.ResourceDa if err != nil { return diag.Errorf("error while fetching host entity : %v", err) } - fmt.Println(resp) getResp := resp.Data.GetValue().(import1.Host) diff --git a/nutanix/services/clustersv2/data_source_nutanix_host_entity_v2_test.go b/nutanix/services/clustersv2/data_source_nutanix_host_entity_v2_test.go index a735926c4..2a9f0d729 100644 --- a/nutanix/services/clustersv2/data_source_nutanix_host_entity_v2_test.go +++ b/nutanix/services/clustersv2/data_source_nutanix_host_entity_v2_test.go @@ -10,7 +10,7 @@ import ( const datasourceNameHostEntity = "data.nutanix_host_v2.test" -func TestAccNutanixHostEntityV2Datasource_Basic(t *testing.T) { +func TestAccV2NutanixHostEntityDatasource_Basic(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -27,7 +27,7 @@ func TestAccNutanixHostEntityV2Datasource_Basic(t *testing.T) { }) } -func TestAccNutanixHostEntityV2Datasource_WithNoClsExtId(t *testing.T) { +func TestAccV2NutanixHostEntityDatasource_WithNoClsExtId(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -40,7 +40,7 @@ func TestAccNutanixHostEntityV2Datasource_WithNoClsExtId(t *testing.T) { }) } -func TestAccNutanixHostEntityV2Datasource_WithNoHostExtId(t *testing.T) { +func TestAccV2NutanixHostEntityDatasource_WithNoHostExtId(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, diff --git a/nutanix/services/clustersv2/resource_nutanix_cluster_discover_unconfigured_nodes_v2_test.go b/nutanix/services/clustersv2/resource_nutanix_cluster_discover_unconfigured_nodes_v2_test.go index 7c56c6462..df5108aea 100644 --- a/nutanix/services/clustersv2/resource_nutanix_cluster_discover_unconfigured_nodes_v2_test.go +++ b/nutanix/services/clustersv2/resource_nutanix_cluster_discover_unconfigured_nodes_v2_test.go @@ -10,7 +10,7 @@ import ( const resourceNameDiscoverUnconfiguredNodes = "nutanix_clusters_discover_unconfigured_nodes_v2.test" -func TestAccNutanixClusterDiscoverUnconfiguredNodesV2Resource_basic(t *testing.T) { +func TestAccV2NutanixClusterDiscoverUnconfiguredNodesResource_basic(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, diff --git a/nutanix/services/clustersv2/resource_nutanix_cluster_entity_v2_test.go b/nutanix/services/clustersv2/resource_nutanix_cluster_entity_v2_test.go index 0a2e92a64..ce4042683 100644 --- a/nutanix/services/clustersv2/resource_nutanix_cluster_entity_v2_test.go +++ b/nutanix/services/clustersv2/resource_nutanix_cluster_entity_v2_test.go @@ -17,7 +17,7 @@ const ( resourceNameClusterRegistration = "nutanix_pc_registration_v2.node-registration" ) -func TestAccNutanixClusterV2Resource_CreateClusterWithMinimumConfig(t *testing.T) { +func TestAccV2NutanixClusterResource_CreateClusterWithMinimumConfig(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("tf-test-cluster-%d", r) @@ -37,7 +37,7 @@ func TestAccNutanixClusterV2Resource_CreateClusterWithMinimumConfig(t *testing.T Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceNameCluster, "name", name), resource.TestCheckResourceAttr(resourceNameCluster, "dryrun", "false"), - resource.TestCheckResourceAttr(resourceNameCluster, "nodes.0.node_list.0.controller_vm_ip.0.ipv4.0.value", testVars.Clusters.CvmIP), + resource.TestCheckResourceAttr(resourceNameCluster, "nodes.0.node_list.0.controller_vm_ip.0.ipv4.0.value", testVars.Clusters.Nodes[0].CvmIp), resource.TestCheckResourceAttr(resourceNameCluster, "nodes.0.number_of_nodes", "1"), resource.TestCheckResourceAttr(resourceNameCluster, "config.0.cluster_arch", testVars.Clusters.Config.ClusterArch), resource.TestCheckResourceAttr(resourceNameCluster, "config.0.fault_tolerance_state.0.domain_awareness_level", testVars.Clusters.Config.FaultToleranceState.DomainAwarenessLevel), @@ -47,7 +47,7 @@ func TestAccNutanixClusterV2Resource_CreateClusterWithMinimumConfig(t *testing.T }) } -func TestAccNutanixClusterV2Resource_CreateClusterWithAllConfig(t *testing.T) { +func TestAccV2NutanixClusterResource_CreateClusterWithAllConfig(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("tf-test-cluster-%d", r) @@ -67,16 +67,16 @@ func TestAccNutanixClusterV2Resource_CreateClusterWithAllConfig(t *testing.T) { Check: resource.ComposeTestCheckFunc( // check the unconfigured node is discovered or not resource.TestCheckResourceAttr(resourceNameDiscoverUnConfigNode, "address_type", "IPV4"), - resource.TestCheckResourceAttr(resourceNameDiscoverUnConfigNode, "ip_filter_list.0.ipv4.0.value", testVars.Clusters.CvmIP), + resource.TestCheckResourceAttr(resourceNameDiscoverUnConfigNode, "ip_filter_list.0.ipv4.0.value", testVars.Clusters.Nodes[0].CvmIp), resource.TestCheckResourceAttr(resourceNameDiscoverUnConfigNode, "unconfigured_nodes.#", "1"), - resource.TestCheckResourceAttr(resourceNameDiscoverUnConfigNode, "unconfigured_nodes.0.cvm_ip.0.ipv4.0.value", testVars.Clusters.CvmIP), + resource.TestCheckResourceAttr(resourceNameDiscoverUnConfigNode, "unconfigured_nodes.0.cvm_ip.0.ipv4.0.value", testVars.Clusters.Nodes[0].CvmIp), resource.TestCheckResourceAttrSet(resourceNameDiscoverUnConfigNode, "unconfigured_nodes.0.nos_version"), resource.TestCheckResourceAttrSet(resourceNameDiscoverUnConfigNode, "unconfigured_nodes.0.hypervisor_type"), // check the cluster is created with minimum config resource.TestCheckResourceAttr(resourceNameCluster, "name", name), resource.TestCheckResourceAttr(resourceNameCluster, "dryrun", "false"), - resource.TestCheckResourceAttr(resourceNameCluster, "nodes.0.node_list.0.controller_vm_ip.0.ipv4.0.value", testVars.Clusters.CvmIP), + resource.TestCheckResourceAttr(resourceNameCluster, "nodes.0.node_list.0.controller_vm_ip.0.ipv4.0.value", testVars.Clusters.Nodes[0].CvmIp), resource.TestCheckResourceAttr(resourceNameCluster, "nodes.0.number_of_nodes", "1"), resource.TestCheckResourceAttr(resourceNameCluster, "config.0.cluster_arch", testVars.Clusters.Config.ClusterArch), resource.TestCheckResourceAttr(resourceNameCluster, "config.0.fault_tolerance_state.0.domain_awareness_level", testVars.Clusters.Config.FaultToleranceState.DomainAwarenessLevel), @@ -87,7 +87,7 @@ func TestAccNutanixClusterV2Resource_CreateClusterWithAllConfig(t *testing.T) { resource.TestCheckResourceAttr(resourceNameCluster, "network.0.ntp_server_ip_list.3.fqdn.0.value", testVars.Clusters.Network.NTPServers[3]), resource.TestCheckResourceAttrSet(resourceNameClusterRegistration, "pc_ext_id"), - resource.TestCheckResourceAttr(resourceNameClusterRegistration, "remote_cluster.0.aos_remote_cluster_spec.0.remote_cluster.0.address.0.ipv4.0.value", testVars.Clusters.CvmIP), + resource.TestCheckResourceAttr(resourceNameClusterRegistration, "remote_cluster.0.aos_remote_cluster_spec.0.remote_cluster.0.address.0.ipv4.0.value", testVars.Clusters.Nodes[0].CvmIp), resource.TestCheckResourceAttr(resourceNameClusterRegistration, "remote_cluster.0.aos_remote_cluster_spec.0.remote_cluster.0.credentials.0.authentication.0.username", testVars.Clusters.Nodes[0].Username), ), }, @@ -99,7 +99,7 @@ func TestAccNutanixClusterV2Resource_CreateClusterWithAllConfig(t *testing.T) { Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceNameCluster, "name", name+"-updated"), resource.TestCheckResourceAttr(resourceNameCluster, "dryrun", "false"), - resource.TestCheckResourceAttr(resourceNameCluster, "nodes.0.node_list.0.controller_vm_ip.0.ipv4.0.value", testVars.Clusters.CvmIP), + resource.TestCheckResourceAttr(resourceNameCluster, "nodes.0.node_list.0.controller_vm_ip.0.ipv4.0.value", testVars.Clusters.Nodes[0].CvmIp), resource.TestCheckResourceAttr(resourceNameCluster, "nodes.0.number_of_nodes", "1"), resource.TestCheckResourceAttr(resourceNameCluster, "config.0.cluster_arch", testVars.Clusters.Config.ClusterArch), resource.TestCheckResourceAttr(resourceNameCluster, "config.0.fault_tolerance_state.0.domain_awareness_level", testVars.Clusters.Config.FaultToleranceState.DomainAwarenessLevel), @@ -143,7 +143,7 @@ func testAccClusterResourceMinimumConfig(name string) string { address_type = "IPV4" ip_filter_list { ipv4 { - value = local.clusters.cvm_ip + value = local.clusters.nodes[0].cvm_ip } } depends_on = [data.nutanix_clusters_v2.clusters] @@ -152,7 +152,7 @@ func testAccClusterResourceMinimumConfig(name string) string { lifecycle { postcondition { condition = length(self.unconfigured_nodes) == 1 - error_message = "The node ${local.clusters.cvm_ip} are not unconfigured" + error_message = "The node ${local.clusters.nodes[0].cvm_ip} are not unconfigured" } } } @@ -165,7 +165,7 @@ func testAccClusterResourceMinimumConfig(name string) string { node_list { controller_vm_ip { ipv4 { - value = local.clusters.cvm_ip + value = local.clusters.nodes[0].cvm_ip } } } @@ -179,7 +179,7 @@ func testAccClusterResourceMinimumConfig(name string) string { } provisioner "local-exec" { - command = " sshpass -p '${local.clusters.pe_password}' ssh -o StrictHostKeyChecking=no ${local.clusters.pe_username}@${local.clusters.cvm_ip} '/home/nutanix/prism/cli/ncli user reset-password user-name=${local.clusters.nodes[0].username} password=${local.clusters.nodes[0].password}' " + command = " sshpass -p '${local.clusters.pe_password}' ssh -o StrictHostKeyChecking=no ${local.clusters.pe_username}@${local.clusters.nodes[0].cvm_ip} '/home/nutanix/prism/cli/ncli user reset-password user-name=${local.clusters.nodes[0].username} password=${local.clusters.nodes[0].password}' " on_failure = continue } @@ -199,7 +199,7 @@ func testAccClusterResourceMinimumConfig(name string) string { remote_cluster { address { ipv4 { - value = local.clusters.cvm_ip + value = local.clusters.nodes[0].cvm_ip } } credentials { @@ -227,7 +227,7 @@ func testAccClusterResourceAllConfig(name string) string { address_type = "IPV4" ip_filter_list { ipv4 { - value = local.clusters.cvm_ip + value = local.clusters.nodes[0].cvm_ip } } depends_on = [data.nutanix_clusters_v2.clusters] @@ -236,7 +236,7 @@ func testAccClusterResourceAllConfig(name string) string { lifecycle { postcondition { condition = length(self.unconfigured_nodes) == 1 - error_message = "The node ${local.clusters.cvm_ip} are not unconfigured" + error_message = "The node ${local.clusters.nodes[0].cvm_ip} are not unconfigured" } } } @@ -249,7 +249,7 @@ func testAccClusterResourceAllConfig(name string) string { node_list { controller_vm_ip { ipv4 { - value = local.clusters.cvm_ip + value = local.clusters.nodes[0].cvm_ip } } } @@ -294,7 +294,7 @@ func testAccClusterResourceAllConfig(name string) string { } provisioner "local-exec" { - command = " sshpass -p '${local.clusters.pe_password}' ssh -o StrictHostKeyChecking=no ${local.clusters.pe_username}@${local.clusters.cvm_ip} '/home/nutanix/prism/cli/ncli user reset-password user-name=${local.clusters.nodes[0].username} password=${local.clusters.nodes[0].password}' " + command = " sshpass -p '${local.clusters.pe_password}' ssh -o StrictHostKeyChecking=no ${local.clusters.pe_username}@${local.clusters.nodes[0].cvm_ip} '/home/nutanix/prism/cli/ncli user reset-password user-name=${local.clusters.nodes[0].username} password=${local.clusters.nodes[0].password}' " on_failure = continue } @@ -309,7 +309,7 @@ func testAccClusterResourceAllConfig(name string) string { remote_cluster { address { ipv4 { - value = local.clusters.cvm_ip + value = local.clusters.nodes[0].cvm_ip } } credentials { @@ -337,7 +337,7 @@ func testAccClusterResourceUpdateConfig(updatedName string) string { address_type = "IPV4" ip_filter_list { ipv4 { - value = local.clusters.cvm_ip + value = local.clusters.nodes[0].cvm_ip } } depends_on = [data.nutanix_clusters_v2.clusters] @@ -346,7 +346,7 @@ func testAccClusterResourceUpdateConfig(updatedName string) string { lifecycle { postcondition { condition = length(self.unconfigured_nodes) == 1 - error_message = "The node ${local.clusters.cvm_ip} are not unconfigured" + error_message = "The node ${local.clusters.nodes[0].cvm_ip} are not unconfigured" } } } @@ -359,7 +359,7 @@ func testAccClusterResourceUpdateConfig(updatedName string) string { node_list { controller_vm_ip { ipv4 { - value = local.clusters.cvm_ip + value = local.clusters.nodes[0].cvm_ip } } } @@ -424,7 +424,7 @@ func testAccClusterResourceUpdateConfig(updatedName string) string { } provisioner "local-exec" { - command = " sshpass -p '${local.clusters.pe_password}' ssh -o StrictHostKeyChecking=no ${local.clusters.pe_username}@${local.clusters.cvm_ip} '/home/nutanix/prism/cli/ncli user reset-password user-name=${local.clusters.nodes[0].username} password=${local.clusters.nodes[0].password}' " + command = " sshpass -p '${local.clusters.pe_password}' ssh -o StrictHostKeyChecking=no ${local.clusters.pe_username}@${local.clusters.nodes[0].cvm_ip} '/home/nutanix/prism/cli/ncli user reset-password user-name=${local.clusters.nodes[0].username} password=${local.clusters.nodes[0].password}' " on_failure = continue } @@ -439,7 +439,7 @@ func testAccClusterResourceUpdateConfig(updatedName string) string { remote_cluster { address { ipv4 { - value = local.clusters.cvm_ip + value = local.clusters.nodes[0].cvm_ip } } credentials { diff --git a/nutanix/services/dataprotectionv2/data_source_nutanix_recovery_point_v2.go b/nutanix/services/dataprotectionv2/data_source_nutanix_recovery_point_v2.go index d2bbf2fc8..69c552cd6 100644 --- a/nutanix/services/dataprotectionv2/data_source_nutanix_recovery_point_v2.go +++ b/nutanix/services/dataprotectionv2/data_source_nutanix_recovery_point_v2.go @@ -411,7 +411,7 @@ func flattenVMRecoveryPoints(vmRecoveryPoints []config.VmRecoveryPoint) []map[st return nil } -func flattenApplicationConsistentProperties(vmRecoveryProperties *config.OneOfVmRecoveryPointApplicationConsistentProperties) map[string]interface{} { +func flattenApplicationConsistentProperties(vmRecoveryProperties *config.OneOfVmRecoveryPointApplicationConsistentProperties) []map[string]interface{} { if vmRecoveryProperties != nil { vmRecProps := make(map[string]interface{}) if *vmRecoveryProperties.ObjectType_ == ApplicationConsistentPropertiesVss1 || @@ -423,7 +423,7 @@ func flattenApplicationConsistentProperties(vmRecoveryProperties *config.OneOfVm vmRecProps["should_store_vss_metadata"] = properties.ShouldStoreVssMetadata vmRecProps["object_type"] = properties.ObjectType_ } - return vmRecProps + return []map[string]interface{}{vmRecProps} } return nil } diff --git a/nutanix/services/dataprotectionv2/data_source_nutanix_recovery_point_v2_test.go b/nutanix/services/dataprotectionv2/data_source_nutanix_recovery_point_v2_test.go index 0d114893f..87a4afbbe 100644 --- a/nutanix/services/dataprotectionv2/data_source_nutanix_recovery_point_v2_test.go +++ b/nutanix/services/dataprotectionv2/data_source_nutanix_recovery_point_v2_test.go @@ -12,7 +12,7 @@ import ( const datasourceNameRecoveryPoint = "data.nutanix_recovery_point_v2.test" -func TestAccNutanixRecoveryPointV2Datasource_VmRecoveryPoints(t *testing.T) { +func TestAccV2NutanixRecoveryPointDatasource_VmRecoveryPoints(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("tf-test-recovery-point-%d", r) vmName := fmt.Sprintf("tf-test-rp-vm-%d", r) diff --git a/nutanix/services/dataprotectionv2/data_source_nutanix_recovery_points_v2_test.go b/nutanix/services/dataprotectionv2/data_source_nutanix_recovery_points_v2_test.go index c1fca0e69..512cfd65b 100644 --- a/nutanix/services/dataprotectionv2/data_source_nutanix_recovery_points_v2_test.go +++ b/nutanix/services/dataprotectionv2/data_source_nutanix_recovery_points_v2_test.go @@ -12,7 +12,7 @@ import ( const datasourceNameRecoveryPoints = "data.nutanix_recovery_points_v2.test" -func TestAccNutanixRecoveryPointsV2Datasource_Basic(t *testing.T) { +func TestAccV2NutanixRecoveryPointsDatasource_Basic(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("tf-test-recovery-point-%d", r) vmName := fmt.Sprintf("tf-test-rp-vm-%d", r) @@ -37,7 +37,7 @@ func TestAccNutanixRecoveryPointsV2Datasource_Basic(t *testing.T) { }) } -func TestAccNutanixRecoveryPointsV2Datasource_WithFilter(t *testing.T) { +func TestAccV2NutanixRecoveryPointsDatasource_WithFilter(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("tf-test-recovery-point-%d", r) vmName := fmt.Sprintf("tf-test-rp-vm-%d", r) @@ -67,7 +67,7 @@ func TestAccNutanixRecoveryPointsV2Datasource_WithFilter(t *testing.T) { }) } -func TestAccNutanixRecoveryPointsV2Datasource_WithLimit(t *testing.T) { +func TestAccV2NutanixRecoveryPointsDatasource_WithLimit(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("tf-test-recovery-point-%d", r) vmName := fmt.Sprintf("tf-test-rp-vm-%d", r) diff --git a/nutanix/services/dataprotectionv2/data_source_nutanix_vm_recovery_point_info_v2.go b/nutanix/services/dataprotectionv2/data_source_nutanix_vm_recovery_point_info_v2.go index 195385724..1d63f80d7 100644 --- a/nutanix/services/dataprotectionv2/data_source_nutanix_vm_recovery_point_info_v2.go +++ b/nutanix/services/dataprotectionv2/data_source_nutanix_vm_recovery_point_info_v2.go @@ -125,6 +125,9 @@ func DatasourceNutanixVMRecoveryPointInfoV2Read(ctx context.Context, d *schema.R if err := d.Set("vm_categories", getResp.VmCategories); err != nil { return diag.FromErr(err) } + if err := d.Set("application_consistent_properties", flattenApplicationConsistentProperties(getResp.ApplicationConsistentProperties)); err != nil { + return diag.FromErr(err) + } d.SetId(*getResp.ExtId) return nil diff --git a/nutanix/services/dataprotectionv2/resource_nutanix_recovery_points_replicate_v2_test.go b/nutanix/services/dataprotectionv2/resource_nutanix_recovery_points_replicate_v2_test.go index b5449d34d..1e193c797 100644 --- a/nutanix/services/dataprotectionv2/resource_nutanix_recovery_points_replicate_v2_test.go +++ b/nutanix/services/dataprotectionv2/resource_nutanix_recovery_points_replicate_v2_test.go @@ -12,7 +12,7 @@ import ( const resourceNameRecoveryPointReplicate = "nutanix_recovery_point_replicate_v2.test" -func TestAccNutanixRecoveryPointReplicateV2Resource_basic(t *testing.T) { +func TestAccV2NutanixRecoveryPointReplicateResource_basic(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("tf-test-recovery-point-%d", r) //clsName := fmt.Sprintf("tf-test-cluster-rp-%d", r) diff --git a/nutanix/services/dataprotectionv2/resource_nutanix_recovery_points_restore_v2_test.go b/nutanix/services/dataprotectionv2/resource_nutanix_recovery_points_restore_v2_test.go index f6a60ca0b..3f2682442 100644 --- a/nutanix/services/dataprotectionv2/resource_nutanix_recovery_points_restore_v2_test.go +++ b/nutanix/services/dataprotectionv2/resource_nutanix_recovery_points_restore_v2_test.go @@ -12,7 +12,7 @@ import ( const resourceNameRecoveryPointRestore = "nutanix_recovery_point_restore_v2.test" -func TestAccNutanixRecoveryPointRestoreV2Resource_basic(t *testing.T) { +func TestAccV2NutanixRecoveryPointRestoreResource_basic(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("tf-test-recovery-point-%d", r) vmName := fmt.Sprintf("tf-test-vm-%d", r) diff --git a/nutanix/services/dataprotectionv2/resource_nutanix_recovery_points_v2_test.go b/nutanix/services/dataprotectionv2/resource_nutanix_recovery_points_v2_test.go index 1fe71ed3e..c39c22913 100644 --- a/nutanix/services/dataprotectionv2/resource_nutanix_recovery_points_v2_test.go +++ b/nutanix/services/dataprotectionv2/resource_nutanix_recovery_points_v2_test.go @@ -20,7 +20,7 @@ var ( filepath = path + "/../../../test_config_v2.json" ) -func TestAccNutanixRecoveryPointsV2Resource_VmRecoveryPoints2(t *testing.T) { +func TestAccV2NutanixRecoveryPointsResource_VmRecoveryPoints2(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("terraform-test-recovery-point-%d", r) vmName := fmt.Sprintf("tf-test-rp-vm-%d", r) @@ -53,7 +53,7 @@ func TestAccNutanixRecoveryPointsV2Resource_VmRecoveryPoints2(t *testing.T) { }) } -func TestAccNutanixRecoveryPointsV2Resource_VmRecoveryPointsWithAppConsProps(t *testing.T) { +func TestAccV2NutanixRecoveryPointsResource_VmRecoveryPointsWithAppConsProps(t *testing.T) { t.Skip("Skipping this test case as it is failing due to missing app consistent properties in get request") r := acctest.RandInt() name := fmt.Sprintf("terraform-test-recovery-point-%d", r) @@ -85,7 +85,7 @@ func TestAccNutanixRecoveryPointsV2Resource_VmRecoveryPointsWithAppConsProps(t * }) } -func TestAccNutanixRecoveryPointsV2Resource_VmRecoveryPointsWithMultipleVms(t *testing.T) { +func TestAccV2NutanixRecoveryPointsResource_VmRecoveryPointsWithMultipleVms(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("terraform-test-recovery-point-%d", r) vmName := fmt.Sprintf("tf-test-rp-vm-%d", r) @@ -116,7 +116,7 @@ func TestAccNutanixRecoveryPointsV2Resource_VmRecoveryPointsWithMultipleVms(t *t }) } -func TestAccNutanixRecoveryPointsV2Resource_VolumeGroupRecoveryPoints(t *testing.T) { +func TestAccV2NutanixRecoveryPointsResource_VolumeGroupRecoveryPoints(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("terraform-test-recovery-point-%d", r) @@ -144,7 +144,7 @@ func TestAccNutanixRecoveryPointsV2Resource_VolumeGroupRecoveryPoints(t *testing }) } -func TestAccNutanixRecoveryPointsV2Resource_VolumeGroupRecoveryPointsWithMultipleVGs(t *testing.T) { +func TestAccV2NutanixRecoveryPointsResource_VolumeGroupRecoveryPointsWithMultipleVGs(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("terraform-test-recovery-point-%d", r) @@ -173,7 +173,7 @@ func TestAccNutanixRecoveryPointsV2Resource_VolumeGroupRecoveryPointsWithMultipl }) } -func TestAccNutanixRecoveryPointsV2Resource_RecoveryPointWithMultipleVmAndVGs(t *testing.T) { +func TestAccV2NutanixRecoveryPointsResource_RecoveryPointWithMultipleVmAndVGs(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("terraform-test-recovery-point-%d", r) vmName := fmt.Sprintf("tf-test-rp-vm-%d", r) @@ -206,7 +206,7 @@ func TestAccNutanixRecoveryPointsV2Resource_RecoveryPointWithMultipleVmAndVGs(t }) } -func TestAccNutanixRecoveryPointsV2Resource_UpdateExpirationTime(t *testing.T) { +func TestAccV2NutanixRecoveryPointsResource_UpdateExpirationTime(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("terraform-test-recovery-point-%d", r) vmName := fmt.Sprintf("tf-test-rp-vm-%d", r) @@ -293,7 +293,7 @@ func testRecoveryPointsResourceConfigWithVMRecoveryPointsWithAppConsProps(name, status = "COMPLETE" recovery_point_type = "APPLICATION_CONSISTENT" vm_recovery_points { - vm_ext_id = vm_ext_id = nutanix_virtual_machine_v2.test-1.id + vm_ext_id = nutanix_virtual_machine_v2.test-1.id application_consistent_properties { backup_type = "FULL_BACKUP" should_include_writers = true diff --git a/nutanix/services/iamv2/data_source_nutanix_authorization_policies_v2_test.go b/nutanix/services/iamv2/data_source_nutanix_authorization_policies_v2_test.go index b07c6aa4f..5e544bceb 100644 --- a/nutanix/services/iamv2/data_source_nutanix_authorization_policies_v2_test.go +++ b/nutanix/services/iamv2/data_source_nutanix_authorization_policies_v2_test.go @@ -44,7 +44,7 @@ resource "nutanix_authorization_policy_v2" "auth_policy_test" { } ` -func TestAccNutanixAuthorizationPoliciesV2Datasource_Basic(t *testing.T) { +func TestAccV2NutanixAuthorizationPoliciesDatasource_Basic(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -59,7 +59,7 @@ func TestAccNutanixAuthorizationPoliciesV2Datasource_Basic(t *testing.T) { }) } -func TestAccNutanixAuthorizationPoliciesV2Datasource_WithFilter(t *testing.T) { +func TestAccV2NutanixAuthorizationPoliciesDatasource_WithFilter(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -75,7 +75,8 @@ func TestAccNutanixAuthorizationPoliciesV2Datasource_WithFilter(t *testing.T) { }) } -func TestAccNutanixAuthorizationPoliciesV2Datasource_WithLimit(t *testing.T) { +func TestAccV2NutanixAuthorizationPoliciesDatasource_WithLimit(t *testing.T) { + resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, diff --git a/nutanix/services/iamv2/data_source_nutanix_authorization_policy_v2_test.go b/nutanix/services/iamv2/data_source_nutanix_authorization_policy_v2_test.go index f91604f28..914c7e5b5 100644 --- a/nutanix/services/iamv2/data_source_nutanix_authorization_policy_v2_test.go +++ b/nutanix/services/iamv2/data_source_nutanix_authorization_policy_v2_test.go @@ -11,7 +11,8 @@ import ( const datasourceNameAuthorizationPolicy = "data.nutanix_authorization_policy_v2.test" -func TestAccNutanixAuthorizationPolicyV2Datasource_Basic(t *testing.T) { +func TestAccV2NutanixAuthorizationPolicyDatasource_Basic(t *testing.T) { + resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, diff --git a/nutanix/services/iamv2/data_source_nutanix_directory_service_v2_test.go b/nutanix/services/iamv2/data_source_nutanix_directory_service_v2_test.go index 6ce3427b9..72719d85c 100644 --- a/nutanix/services/iamv2/data_source_nutanix_directory_service_v2_test.go +++ b/nutanix/services/iamv2/data_source_nutanix_directory_service_v2_test.go @@ -10,7 +10,7 @@ import ( const datasourceNameDirectoryService = "data.nutanix_directory_service_v2.test" -func TestAccNutanixDirectoryServiceV2Datasource_Basic(t *testing.T) { +func TestAccV2NutanixDirectoryServiceDatasource_Basic(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, diff --git a/nutanix/services/iamv2/data_source_nutanix_directory_services_v2_test.go b/nutanix/services/iamv2/data_source_nutanix_directory_services_v2_test.go index a350fe3d9..432e703c7 100644 --- a/nutanix/services/iamv2/data_source_nutanix_directory_services_v2_test.go +++ b/nutanix/services/iamv2/data_source_nutanix_directory_services_v2_test.go @@ -10,7 +10,7 @@ import ( const datasourceNameDirectoryServices = "data.nutanix_directory_services_v2.test" -func TestAccNutanixDirectoryServicesV2Datasource_Basic(t *testing.T) { +func TestAccV2NutanixDirectoryServicesDatasource_Basic(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -28,7 +28,7 @@ func TestAccNutanixDirectoryServicesV2Datasource_Basic(t *testing.T) { }) } -func TestAccNutanixDirectoryServicesV2Datasource_WithFilter(t *testing.T) { +func TestAccV2NutanixDirectoryServicesDatasource_WithFilter(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -51,7 +51,7 @@ func TestAccNutanixDirectoryServicesV2Datasource_WithFilter(t *testing.T) { }) } -func TestAccNutanixDirectoryServicesV2Datasource_WithLimit(t *testing.T) { +func TestAccV2NutanixDirectoryServicesDatasource_WithLimit(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, diff --git a/nutanix/services/iamv2/data_source_nutanix_operation_v2_test.go b/nutanix/services/iamv2/data_source_nutanix_operation_v2_test.go index ae50a6968..cb42cd65c 100644 --- a/nutanix/services/iamv2/data_source_nutanix_operation_v2_test.go +++ b/nutanix/services/iamv2/data_source_nutanix_operation_v2_test.go @@ -9,7 +9,7 @@ import ( const datasourceNameOperation = "data.nutanix_operation_v2.test" -func TestAccNutanixOperationV2Datasource_Basic(t *testing.T) { +func TestAccV2NutanixOperationDatasource_Basic(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, diff --git a/nutanix/services/iamv2/data_source_nutanix_operations_v2_test.go b/nutanix/services/iamv2/data_source_nutanix_operations_v2_test.go index 2d965aaa4..5910fac20 100644 --- a/nutanix/services/iamv2/data_source_nutanix_operations_v2_test.go +++ b/nutanix/services/iamv2/data_source_nutanix_operations_v2_test.go @@ -11,7 +11,7 @@ import ( const datasourceNameOperations = "data.nutanix_operations_v2.test" -func TestAccNutanixOperationsV2Datasource_Basic(t *testing.T) { +func TestAccV2NutanixOperationsDatasource_Basic(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -26,7 +26,7 @@ func TestAccNutanixOperationsV2Datasource_Basic(t *testing.T) { }) } -func TestAccNutanixOperationsV2Datasource_WithLimit(t *testing.T) { +func TestAccV2NutanixOperationsDatasource_WithLimit(t *testing.T) { limit := 3 resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, diff --git a/nutanix/services/iamv2/data_source_nutanix_role_v2_test.go b/nutanix/services/iamv2/data_source_nutanix_role_v2_test.go index 56ad67ef3..3cc5038c3 100644 --- a/nutanix/services/iamv2/data_source_nutanix_role_v2_test.go +++ b/nutanix/services/iamv2/data_source_nutanix_role_v2_test.go @@ -10,7 +10,7 @@ import ( const datasourceNameRole = "data.nutanix_role_v2.test" -func TestAccNutanixRolesV2Datasource_Basic_Role(t *testing.T) { +func TestAccV2NutanixRolesDatasource_Basic_Role(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, diff --git a/nutanix/services/iamv2/data_source_nutanix_roles_v2_test.go b/nutanix/services/iamv2/data_source_nutanix_roles_v2_test.go index ad2cceeff..6a91a62fc 100644 --- a/nutanix/services/iamv2/data_source_nutanix_roles_v2_test.go +++ b/nutanix/services/iamv2/data_source_nutanix_roles_v2_test.go @@ -10,7 +10,7 @@ import ( const datasourceNameRoles = "data.nutanix_roles_v2.test" -func TestAccNutanixRolesV2Datasource_Basic(t *testing.T) { +func TestAccV2NutanixRolesDatasource_Basic(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -27,7 +27,7 @@ func TestAccNutanixRolesV2Datasource_Basic(t *testing.T) { }) } -func TestAccNutanixRolesV2Datasource_WithFilter(t *testing.T) { +func TestAccV2NutanixRolesDatasource_WithFilter(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -45,7 +45,7 @@ func TestAccNutanixRolesV2Datasource_WithFilter(t *testing.T) { }) } -func TestAccNutanixRolesV2Datasource_WithLimit(t *testing.T) { +func TestAccV2NutanixRolesDatasource_WithLimit(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, diff --git a/nutanix/services/iamv2/data_source_nutanix_saml_idp_v2_test.go b/nutanix/services/iamv2/data_source_nutanix_saml_idp_v2_test.go index fae174983..778cf1953 100644 --- a/nutanix/services/iamv2/data_source_nutanix_saml_idp_v2_test.go +++ b/nutanix/services/iamv2/data_source_nutanix_saml_idp_v2_test.go @@ -10,7 +10,7 @@ import ( const datasourceNameIdentityProvider = "data.nutanix_saml_identity_provider_v2.test" -func TestAccNutanixIdentityProvidersV2Datasource_GetSamlIdpById(t *testing.T) { +func TestAccV2NutanixIdentityProvidersDatasource_GetSamlIdpById(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, diff --git a/nutanix/services/iamv2/data_source_nutanix_saml_idps_v2_test.go b/nutanix/services/iamv2/data_source_nutanix_saml_idps_v2_test.go index bbbd90608..b8ce5583a 100644 --- a/nutanix/services/iamv2/data_source_nutanix_saml_idps_v2_test.go +++ b/nutanix/services/iamv2/data_source_nutanix_saml_idps_v2_test.go @@ -10,7 +10,7 @@ import ( const datasourceNameIdentityProviders = "data.nutanix_saml_identity_providers_v2.test" -func TestAccNutanixIdentityProvidersV2Datasource_ListAllIDPS(t *testing.T) { +func TestAccV2NutanixIdentityProvidersDatasource_ListAllIDPS(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -27,7 +27,7 @@ func TestAccNutanixIdentityProvidersV2Datasource_ListAllIDPS(t *testing.T) { }) } -func TestAccNutanixIdentityProvidersV2Datasource_WithFilter(t *testing.T) { +func TestAccV2NutanixIdentityProvidersDatasource_WithFilter(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -54,7 +54,7 @@ func TestAccNutanixIdentityProvidersV2Datasource_WithFilter(t *testing.T) { }) } -func TestAccNutanixIdentityProvidersV2Datasource_WithLimit(t *testing.T) { +func TestAccV2NutanixIdentityProvidersDatasource_WithLimit(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, diff --git a/nutanix/services/iamv2/data_source_nutanix_user_group_v2_test.go b/nutanix/services/iamv2/data_source_nutanix_user_group_v2_test.go index b855fcb34..cecbe0149 100644 --- a/nutanix/services/iamv2/data_source_nutanix_user_group_v2_test.go +++ b/nutanix/services/iamv2/data_source_nutanix_user_group_v2_test.go @@ -10,7 +10,7 @@ import ( const datasourceNameUserGroup = "data.nutanix_user_group_v2.test" -func TestAccNutanixUserGroupsV2Datasource_GetUserGroupByExrId(t *testing.T) { +func TestAccV2NutanixUserGroupsDatasource_GetUserGroupByExrId(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, diff --git a/nutanix/services/iamv2/datasource_nutanix_user_v2_test.go b/nutanix/services/iamv2/datasource_nutanix_user_v2_test.go index fa21089b5..970adf390 100644 --- a/nutanix/services/iamv2/datasource_nutanix_user_v2_test.go +++ b/nutanix/services/iamv2/datasource_nutanix_user_v2_test.go @@ -11,7 +11,7 @@ import ( const datasourceNameUser = "data.nutanix_user_v2.test" -func TestAccNutanixUserV2Datasource_Basic(t *testing.T) { +func TestAccV2NutanixUserDatasource_Basic(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("test-user-%d", r) diff --git a/nutanix/services/iamv2/datasource_nutanix_users_v2_test.go b/nutanix/services/iamv2/datasource_nutanix_users_v2_test.go index 9d05ece0a..8c36e676c 100644 --- a/nutanix/services/iamv2/datasource_nutanix_users_v2_test.go +++ b/nutanix/services/iamv2/datasource_nutanix_users_v2_test.go @@ -11,7 +11,7 @@ import ( const datasourceNameUsers = "data.nutanix_users_v2.test" -func TestAccNutanixUsersV2Datasource_Basic(t *testing.T) { +func TestAccV2NutanixUsersDatasource_Basic(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("test-user-%d", r) @@ -32,7 +32,7 @@ func TestAccNutanixUsersV2Datasource_Basic(t *testing.T) { }) } -func TestAccNutanixUsersV2Datasource_WithFilter(t *testing.T) { +func TestAccV2NutanixUsersDatasource_WithFilter(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("test-user-%d", r) @@ -58,7 +58,7 @@ func TestAccNutanixUsersV2Datasource_WithFilter(t *testing.T) { }) } -func TestAccNutanixUsersV2Datasource_WithLimit(t *testing.T) { +func TestAccV2NutanixUsersDatasource_WithLimit(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("test-user-%d", r) diff --git a/nutanix/services/iamv2/resource_nutanix_authorization_policies_v2_test.go b/nutanix/services/iamv2/resource_nutanix_authorization_policies_v2_test.go index a88865640..b1fa45c9c 100644 --- a/nutanix/services/iamv2/resource_nutanix_authorization_policies_v2_test.go +++ b/nutanix/services/iamv2/resource_nutanix_authorization_policies_v2_test.go @@ -12,7 +12,7 @@ import ( const resourceNameAuthorizationPolicy = "nutanix_authorization_policy_v2.test" -func TestAccNutanixAuthorizationPolicyV2Resource_CreateACP(t *testing.T) { +func TestAccV2NutanixAuthorizationPolicyResource_CreateACP(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccFoundationPreCheck(t) }, Providers: acc.TestAccProviders, @@ -50,7 +50,7 @@ func TestAccNutanixAuthorizationPolicyV2Resource_CreateACP(t *testing.T) { }) } -func TestAccNutanixAuthorizationPolicyV2Resource_WithNoDisplayName(t *testing.T) { +func TestAccV2NutanixAuthorizationPolicyResource_WithNoDisplayName(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -63,7 +63,7 @@ func TestAccNutanixAuthorizationPolicyV2Resource_WithNoDisplayName(t *testing.T) }) } -func TestAccNutanixAuthorizationPolicyV2Resource_WithNoIdentities(t *testing.T) { +func TestAccV2NutanixAuthorizationPolicyResource_WithNoIdentities(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -76,7 +76,7 @@ func TestAccNutanixAuthorizationPolicyV2Resource_WithNoIdentities(t *testing.T) }) } -func TestAccNutanixAuthorizationPolicyV2Resource_WithNoEntities(t *testing.T) { +func TestAccV2NutanixAuthorizationPolicyResource_WithNoEntities(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -89,7 +89,7 @@ func TestAccNutanixAuthorizationPolicyV2Resource_WithNoEntities(t *testing.T) { }) } -func TestAccNutanixAuthorizationPolicyV2Resource_WithNoRole(t *testing.T) { +func TestAccV2NutanixAuthorizationPolicyResource_WithNoRole(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, diff --git a/nutanix/services/iamv2/resource_nutanix_directory_services_v2_test.go b/nutanix/services/iamv2/resource_nutanix_directory_services_v2_test.go index 869d67868..fb7ca650f 100644 --- a/nutanix/services/iamv2/resource_nutanix_directory_services_v2_test.go +++ b/nutanix/services/iamv2/resource_nutanix_directory_services_v2_test.go @@ -12,7 +12,7 @@ import ( const resourceNameDirectoryServices = "nutanix_directory_services_v2.test" -func TestAccNutanixDirectoryServicesV2Resource_CreateACTIVE_DIRECTORYService(t *testing.T) { +func TestAccV2NutanixDirectoryServicesResource_CreateACTIVE_DIRECTORYService(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccFoundationPreCheck(t) }, Providers: acc.TestAccProviders, @@ -47,7 +47,7 @@ func TestAccNutanixDirectoryServicesV2Resource_CreateACTIVE_DIRECTORYService(t * }) } -func TestAccNutanixDirectoryServicesV2Resource_CreateOpenLDAPService(t *testing.T) { +func TestAccV2NutanixDirectoryServicesResource_CreateOpenLDAPService(t *testing.T) { t.Skip("Skipping test as OpenLDAP waiting for LDAP configuration") name := fmt.Sprintf("tf-test-openldap-%d", acctest.RandInt()) @@ -72,7 +72,7 @@ func TestAccNutanixDirectoryServicesV2Resource_CreateOpenLDAPService(t *testing. }) } -func TestAccNutanixDirectoryServicesV2Resource_CreateACTIVE_DIRECTORYAlreadyExists(t *testing.T) { +func TestAccV2NutanixDirectoryServicesResource_CreateACTIVE_DIRECTORYAlreadyExists(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccFoundationPreCheck(t) }, Providers: acc.TestAccProviders, @@ -97,7 +97,7 @@ func TestAccNutanixDirectoryServicesV2Resource_CreateACTIVE_DIRECTORYAlreadyExis }) } -func TestAccNutanixDirectoryServicesV2Resource_WithNoName(t *testing.T) { +func TestAccV2NutanixDirectoryServicesResource_WithNoName(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -110,7 +110,7 @@ func TestAccNutanixDirectoryServicesV2Resource_WithNoName(t *testing.T) { }) } -func TestAccNutanixDirectoryServicesV2Resource_WithNoUrl(t *testing.T) { +func TestAccV2NutanixDirectoryServicesResource_WithNoUrl(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -123,7 +123,7 @@ func TestAccNutanixDirectoryServicesV2Resource_WithNoUrl(t *testing.T) { }) } -func TestAccNutanixDirectoryServicesV2Resource_WithNoDomainName(t *testing.T) { +func TestAccV2NutanixDirectoryServicesResource_WithNoDomainName(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -136,7 +136,7 @@ func TestAccNutanixDirectoryServicesV2Resource_WithNoDomainName(t *testing.T) { }) } -func TestAccNutanixDirectoryServicesV2Resource_WithNoDirectoryType(t *testing.T) { +func TestAccV2NutanixDirectoryServicesResource_WithNoDirectoryType(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -149,7 +149,7 @@ func TestAccNutanixDirectoryServicesV2Resource_WithNoDirectoryType(t *testing.T) }) } -func TestAccNutanixDirectoryServicesV2Resource_WithNoServiceAccount(t *testing.T) { +func TestAccV2NutanixDirectoryServicesResource_WithNoServiceAccount(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, diff --git a/nutanix/services/iamv2/resource_nutanix_roles_v2_test.go b/nutanix/services/iamv2/resource_nutanix_roles_v2_test.go index 051df76dc..6dc6674a2 100644 --- a/nutanix/services/iamv2/resource_nutanix_roles_v2_test.go +++ b/nutanix/services/iamv2/resource_nutanix_roles_v2_test.go @@ -11,7 +11,7 @@ import ( const resourceNameRoles = "nutanix_roles_v2.test" -func TestAccNutanixRolesV2Resource_Basic(t *testing.T) { +func TestAccV2NutanixRolesResource_Basic(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccFoundationPreCheck(t) }, Providers: acc.TestAccProviders, @@ -37,7 +37,7 @@ func TestAccNutanixRolesV2Resource_Basic(t *testing.T) { }) } -func TestAccNutanixRolesV2Resource_DuplicateRole(t *testing.T) { +func TestAccV2NutanixRolesResource_DuplicateRole(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -50,7 +50,7 @@ func TestAccNutanixRolesV2Resource_DuplicateRole(t *testing.T) { }) } -func TestAccNutanixRolesV2Resource_WithNoDisplayName(t *testing.T) { +func TestAccV2NutanixRolesResource_WithNoDisplayName(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -63,7 +63,7 @@ func TestAccNutanixRolesV2Resource_WithNoDisplayName(t *testing.T) { }) } -func TestAccNutanixRolesV2Resource_WithNoOperations(t *testing.T) { +func TestAccV2NutanixRolesResource_WithNoOperations(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, diff --git a/nutanix/services/iamv2/resource_nutanix_saml_idp_v2_test.go b/nutanix/services/iamv2/resource_nutanix_saml_idp_v2_test.go index 8543174b0..9f1e2c6c0 100644 --- a/nutanix/services/iamv2/resource_nutanix_saml_idp_v2_test.go +++ b/nutanix/services/iamv2/resource_nutanix_saml_idp_v2_test.go @@ -11,7 +11,7 @@ import ( const resourceNameIdentityProviders = "nutanix_saml_identity_providers_v2.test" -func TestAccNutanixIdentityProvidersV2Resource_CreateSamlIdp(t *testing.T) { +func TestAccV2NutanixIdentityProvidersResource_CreateSamlIdp(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccFoundationPreCheck(t) }, Providers: acc.TestAccProviders, @@ -34,7 +34,7 @@ func TestAccNutanixIdentityProvidersV2Resource_CreateSamlIdp(t *testing.T) { }) } -func TestAccNutanixIdentityProvidersV2ResourceWithNoName(t *testing.T) { +func TestAccV2NutanixIdentityProvidersResourceWithNoName(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -47,7 +47,7 @@ func TestAccNutanixIdentityProvidersV2ResourceWithNoName(t *testing.T) { }) } -func TestAccNutanixIdentityProvidersV2ResourceWithNoEntityId(t *testing.T) { +func TestAccV2NutanixIdentityProvidersResourceWithNoEntityId(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, diff --git a/nutanix/services/iamv2/resource_nutanix_user_groups_v2_test.go b/nutanix/services/iamv2/resource_nutanix_user_groups_v2_test.go index 06394da9e..c485f3020 100644 --- a/nutanix/services/iamv2/resource_nutanix_user_groups_v2_test.go +++ b/nutanix/services/iamv2/resource_nutanix_user_groups_v2_test.go @@ -11,7 +11,7 @@ import ( const resourceNameUserGroups = "nutanix_user_groups_v2.test" -func TestAccNutanixUserGroupsV2Resource_LDAPUserGroup(t *testing.T) { +func TestAccV2NutanixUserGroupsResource_LDAPUserGroup(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccFoundationPreCheck(t) }, Providers: acc.TestAccProviders, @@ -33,7 +33,7 @@ func TestAccNutanixUserGroupsV2Resource_LDAPUserGroup(t *testing.T) { }) } -func TestAccNutanixUserGroupsV2Resource_SAMLUserGroup(t *testing.T) { +func TestAccV2NutanixUserGroupsResource_SAMLUserGroup(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccFoundationPreCheck(t) }, Providers: acc.TestAccProviders, @@ -54,7 +54,7 @@ func TestAccNutanixUserGroupsV2Resource_SAMLUserGroup(t *testing.T) { }) } -func TestAccNutanixUserGroupsV2Resource_WithNoGroupType(t *testing.T) { +func TestAccV2NutanixUserGroupsResource_WithNoGroupType(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -67,7 +67,7 @@ func TestAccNutanixUserGroupsV2Resource_WithNoGroupType(t *testing.T) { }) } -func TestAccNutanixUserGroupsV2Resource_WithNoIdpId(t *testing.T) { +func TestAccV2NutanixUserGroupsResource_WithNoIdpId(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, diff --git a/nutanix/services/iamv2/resource_nutanix_users_v2_test.go b/nutanix/services/iamv2/resource_nutanix_users_v2_test.go index 29003eaf1..346fac338 100644 --- a/nutanix/services/iamv2/resource_nutanix_users_v2_test.go +++ b/nutanix/services/iamv2/resource_nutanix_users_v2_test.go @@ -13,7 +13,7 @@ import ( const resourceNameUsers = "nutanix_users_v2.test" // create local Active user, and test update the username and display name -func TestAccNutanixUsersV2Resource_LocalActiveUser(t *testing.T) { +func TestAccV2NutanixUsersResource_LocalActiveUser(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("tf-test-user-%d", r) @@ -54,7 +54,7 @@ func TestAccNutanixUsersV2Resource_LocalActiveUser(t *testing.T) { } // test duplicate user creation -func TestAccNutanixUsersV2Resource_AlreadyExistsUser(t *testing.T) { +func TestAccV2NutanixUsersResource_AlreadyExistsUser(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("tf-test-user-%d", r) @@ -82,7 +82,7 @@ func TestAccNutanixUsersV2Resource_AlreadyExistsUser(t *testing.T) { } // create local Inactive user -func TestAccNutanixUsersV2Resource_LocalInactiveUser(t *testing.T) { +func TestAccV2NutanixUsersResource_LocalInactiveUser(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("tf-test-user-%d", r) @@ -107,7 +107,7 @@ func TestAccNutanixUsersV2Resource_LocalInactiveUser(t *testing.T) { } // create SAML user -func TestAccNutanixUsersV2Resource_SAMLUser(t *testing.T) { +func TestAccV2NutanixUsersResource_SAMLUser(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("tf-test-user-%d", r) @@ -129,7 +129,7 @@ func TestAccNutanixUsersV2Resource_SAMLUser(t *testing.T) { } // create LDAP user -func TestAccNutanixUsersV2Resource_LDAPUser(t *testing.T) { +func TestAccV2NutanixUsersResource_LDAPUser(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccFoundationPreCheck(t) }, Providers: acc.TestAccProviders, @@ -148,7 +148,7 @@ func TestAccNutanixUsersV2Resource_LDAPUser(t *testing.T) { } // create local Active user, and test update the username and display name -func TestAccNutanixUsersV2Resource_DeactivateLocalUser(t *testing.T) { +func TestAccV2NutanixUsersResource_DeactivateLocalUser(t *testing.T) { t.Skip("these test were commented since they are using different APIs") r := acctest.RandInt() name := fmt.Sprintf("tf-test-user-%d", r) @@ -187,7 +187,7 @@ func TestAccNutanixUsersV2Resource_DeactivateLocalUser(t *testing.T) { } // Test missing username -func TestAccNutanixUsersV2Resource_WithNoUserName(t *testing.T) { +func TestAccV2NutanixUsersResource_WithNoUserName(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -201,7 +201,7 @@ func TestAccNutanixUsersV2Resource_WithNoUserName(t *testing.T) { } // Test missing user type -func TestAccNutanixUsersV2Resource_WithNoUserType(t *testing.T) { +func TestAccV2NutanixUsersResource_WithNoUserType(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("tf-test-user-%d", r) diff --git a/nutanix/services/prismv2/data_source_nutanix_categories_v2_test.go b/nutanix/services/prismv2/data_source_nutanix_categories_v2_test.go index b2d4bc931..ffea8afe3 100644 --- a/nutanix/services/prismv2/data_source_nutanix_categories_v2_test.go +++ b/nutanix/services/prismv2/data_source_nutanix_categories_v2_test.go @@ -9,7 +9,7 @@ import ( const datasourceNameCategories = "data.nutanix_categories_v2.test" -func TestAccNutanixCategoriesV2DataSource_basic(t *testing.T) { +func TestAccV2NutanixCategoriesDataSource_basic(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -28,7 +28,7 @@ func TestAccNutanixCategoriesV2DataSource_basic(t *testing.T) { }) } -func TestAccNutanixCategoriesV2DataSource_WithFilter(t *testing.T) { +func TestAccV2NutanixCategoriesDataSource_WithFilter(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -48,7 +48,7 @@ func TestAccNutanixCategoriesV2DataSource_WithFilter(t *testing.T) { }) } -func TestAccNutanixCategoriesV2DataSource_WithLimit(t *testing.T) { +func TestAccV2NutanixCategoriesDataSource_WithLimit(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, diff --git a/nutanix/services/prismv2/data_source_nutanix_category_v2_test.go b/nutanix/services/prismv2/data_source_nutanix_category_v2_test.go index 847347e2e..80d311c63 100644 --- a/nutanix/services/prismv2/data_source_nutanix_category_v2_test.go +++ b/nutanix/services/prismv2/data_source_nutanix_category_v2_test.go @@ -9,7 +9,7 @@ import ( const datasourceNameCategory = "data.nutanix_category_v2.test" -func TestAccNutanixCategoryV2DataSource_basic(t *testing.T) { +func TestAccV2NutanixCategoryDataSource_basic(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, diff --git a/nutanix/services/prismv2/resource_nutanix_categories_v2_test.go b/nutanix/services/prismv2/resource_nutanix_categories_v2_test.go index 77041a5ef..50eddd3f2 100644 --- a/nutanix/services/prismv2/resource_nutanix_categories_v2_test.go +++ b/nutanix/services/prismv2/resource_nutanix_categories_v2_test.go @@ -12,7 +12,7 @@ import ( const resourceNameCategory = "nutanix_category_v2.test" -func TestAccNutanixCategoryV2Resource_Basic(t *testing.T) { +func TestAccV2NutanixCategoryResource_Basic(t *testing.T) { r := acctest.RandInt() value := fmt.Sprintf("test category value-%d", r) desc := "test category description" @@ -33,7 +33,7 @@ func TestAccNutanixCategoryV2Resource_Basic(t *testing.T) { }) } -func TestAccNutanixCategoryV2Resource_Update(t *testing.T) { +func TestAccV2NutanixCategoryResource_Update(t *testing.T) { r := acctest.RandInt() value := fmt.Sprintf("test category value-%d", r) desc := "test category description" @@ -66,7 +66,7 @@ func TestAccNutanixCategoryV2Resource_Update(t *testing.T) { }) } -func TestAccNutanixCategoryV2Resource_WithNoKey(t *testing.T) { +func TestAccV2NutanixCategoryResource_WithNoKey(t *testing.T) { r := acctest.RandInt() value := fmt.Sprintf("test category value-%d", r) desc := "test category description" diff --git a/nutanix/services/storagecontainersv2/data_source_nutanix_storage_container_stats_test.go b/nutanix/services/storagecontainersv2/data_source_nutanix_storage_container_stats_test.go index 100356035..c536b802d 100644 --- a/nutanix/services/storagecontainersv2/data_source_nutanix_storage_container_stats_test.go +++ b/nutanix/services/storagecontainersv2/data_source_nutanix_storage_container_stats_test.go @@ -14,7 +14,7 @@ import ( const datasourceNameStorageStatsInfo = "data.nutanix_storage_container_stats_info_v2.test" -func TestAccNutanixStorageStatsInfoV2Datasource_Basic(t *testing.T) { +func TestAccV2NutanixStorageStatsInfoDataSource_Basic(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("tf-test-storage-container-%d", r) path, _ := os.Getwd() @@ -44,7 +44,7 @@ func TestAccNutanixStorageStatsInfoV2Datasource_Basic(t *testing.T) { }) } -func TestAccNutanixStorageStatsInfoV2Datasource_SampleInterval(t *testing.T) { +func TestAccV2NutanixStorageStatsInfoDataSource_SampleInterval(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("tf-test-storage-container-%d", r) path, _ := os.Getwd() @@ -74,7 +74,7 @@ func TestAccNutanixStorageStatsInfoV2Datasource_SampleInterval(t *testing.T) { }) } -func TestAccNutanixStorageStatsInfoV2Datasource_StatType(t *testing.T) { +func TestAccV2NutanixStorageStatsInfoDataSource_StatType(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("tf-test-storage-container-%d", r) path, _ := os.Getwd() @@ -104,7 +104,7 @@ func TestAccNutanixStorageStatsInfoV2Datasource_StatType(t *testing.T) { }) } -func TestAccNutanixStorageStatsInfoV2Datasource_InvalidSampleInterval(t *testing.T) { +func TestAccV2NutanixStorageStatsInfoDataSource_InvalidSampleInterval(t *testing.T) { // Start time is now startTime := time.Now() @@ -127,7 +127,7 @@ func TestAccNutanixStorageStatsInfoV2Datasource_InvalidSampleInterval(t *testing }) } -func TestAccNutanixStorageStatsInfoV2Datasource_InvalidStatType(t *testing.T) { +func TestAccV2NutanixStorageStatsInfoDataSource_InvalidStatType(t *testing.T) { // Start time is now startTime := time.Now() @@ -150,7 +150,7 @@ func TestAccNutanixStorageStatsInfoV2Datasource_InvalidStatType(t *testing.T) { }) } -func TestAccNutanixStorageStatsInfoV2Datasource_MissingRequiredArgs(t *testing.T) { +func TestAccV2NutanixStorageStatsInfoDataSource_MissingRequiredArgs(t *testing.T) { // Start time is now startTime := time.Now() diff --git a/nutanix/services/storagecontainersv2/data_source_nutanix_storge_container_test.go b/nutanix/services/storagecontainersv2/data_source_nutanix_storge_container_test.go index 63262cfac..cf2420cbf 100644 --- a/nutanix/services/storagecontainersv2/data_source_nutanix_storge_container_test.go +++ b/nutanix/services/storagecontainersv2/data_source_nutanix_storge_container_test.go @@ -13,7 +13,7 @@ import ( const datasourceNameStorageContainer = "data.nutanix_storage_container_v2.test" -func TestAccNutanixStorageContainerV2Datasource_Basic(t *testing.T) { +func TestAccV2NutanixStorageContainerDataSource_Basic(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("tf-test-storage-container-%d", r) path, _ := os.Getwd() diff --git a/nutanix/services/storagecontainersv2/data_source_nutanix_storge_containers_test.go b/nutanix/services/storagecontainersv2/data_source_nutanix_storge_containers_test.go index 3f7bae490..e1cd9aafe 100644 --- a/nutanix/services/storagecontainersv2/data_source_nutanix_storge_containers_test.go +++ b/nutanix/services/storagecontainersv2/data_source_nutanix_storge_containers_test.go @@ -13,7 +13,7 @@ import ( const datasourceNameStorageContainersV4 = "data.nutanix_storage_containers_v2.test" -func TestAccNutanixStorageContainersV2Datasource_Basic(t *testing.T) { +func TestAccV2NutanixStorageContainersDataSource_Basic(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -28,7 +28,7 @@ func TestAccNutanixStorageContainersV2Datasource_Basic(t *testing.T) { }) } -func TestAccNutanixStorageContainersV2Datasource_WithFilter(t *testing.T) { +func TestAccV2NutanixStorageContainersDataSource_WithFilter(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("tf-test-storage-container-%d", r) path, _ := os.Getwd() @@ -55,7 +55,7 @@ func TestAccNutanixStorageContainersV2Datasource_WithFilter(t *testing.T) { }) } -func TestAccNutanixStorageContainersV2Datasource_WithLimit(t *testing.T) { +func TestAccV2NutanixStorageContainersDataSource_WithLimit(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("tf-test-storage-container-%d", r) path, _ := os.Getwd() diff --git a/nutanix/services/storagecontainersv2/resource_nutanix_storge_containers_test.go b/nutanix/services/storagecontainersv2/resource_nutanix_storge_containers_test.go index 4a21e802a..02567bafb 100644 --- a/nutanix/services/storagecontainersv2/resource_nutanix_storge_containers_test.go +++ b/nutanix/services/storagecontainersv2/resource_nutanix_storge_containers_test.go @@ -14,7 +14,7 @@ import ( const resourceNameStorageContainers = "nutanix_storage_containers_v2.test" -func TestAccNutanixStorageContainersV2Resource_Basic(t *testing.T) { +func TestAccV2NutanixStorageContainersResource_Basic(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("terraform-test-storage-container-%d", r) path, _ := os.Getwd() @@ -53,7 +53,7 @@ func TestAccNutanixStorageContainersV2Resource_Basic(t *testing.T) { }) } -func TestAccNutanixStorageContainersV2Resource_WithNoClusterExtId(t *testing.T) { +func TestAccV2NutanixStorageContainersResource_WithNoClusterExtId(t *testing.T) { path, _ := os.Getwd() filepath := path + "/../../../test_config_v2.json" resource.Test(t, resource.TestCase{ @@ -68,7 +68,7 @@ func TestAccNutanixStorageContainersV2Resource_WithNoClusterExtId(t *testing.T) }) } -func TestAccNutanixStorageContainersV2Resource_WithNoName(t *testing.T) { +func TestAccV2NutanixStorageContainersResource_WithNoName(t *testing.T) { path, _ := os.Getwd() filepath := path + "/../../../test_config_v2.json" resource.Test(t, resource.TestCase{ diff --git a/nutanix/services/volumesv2/data_source_nutanix_volume_category_details_v2_test.go b/nutanix/services/volumesv2/data_source_nutanix_volume_category_details_v2_test.go index 747c7c280..6425093b4 100644 --- a/nutanix/services/volumesv2/data_source_nutanix_volume_category_details_v2_test.go +++ b/nutanix/services/volumesv2/data_source_nutanix_volume_category_details_v2_test.go @@ -10,7 +10,7 @@ import ( const dataSourceVolumeCategoryDetails = "data.nutanix_volume_group_category_details_v2.test" -func TestAccNutanixVolumeCategoryDetailsV2Datasource_Basic(t *testing.T) { +func TestAccV2NutanixVolumeCategoryDetailsDataSource_Basic(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, diff --git a/nutanix/services/volumesv2/data_source_nutanix_volume_disk_v2_test.go b/nutanix/services/volumesv2/data_source_nutanix_volume_disk_v2_test.go index 3eaee3bc6..a6b1ab3d1 100644 --- a/nutanix/services/volumesv2/data_source_nutanix_volume_disk_v2_test.go +++ b/nutanix/services/volumesv2/data_source_nutanix_volume_disk_v2_test.go @@ -13,7 +13,7 @@ import ( const dataSourceVolumeGroupsDisk = "data.nutanix_volume_group_disk_v2.test" -func TestAccNutanixVolumeGroupsDiskV2DataSource_Basic(t *testing.T) { +func TestAccV2NutanixVolumeGroupsDiskDataSource_Basic(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("terraform-test-volume-group-disk-%d", r) desc := "terraform test volume group disk description" diff --git a/nutanix/services/volumesv2/data_source_nutanix_volume_disks_v2_test.go b/nutanix/services/volumesv2/data_source_nutanix_volume_disks_v2_test.go index d6f47f39a..08c1fd42e 100644 --- a/nutanix/services/volumesv2/data_source_nutanix_volume_disks_v2_test.go +++ b/nutanix/services/volumesv2/data_source_nutanix_volume_disks_v2_test.go @@ -13,7 +13,7 @@ import ( const dataSourceVolumeGroupsDisks = "data.nutanix_volume_group_disks_v2.test" -func TestAccNutanixVolumeGroupsDisksV2DataSource_Basic(t *testing.T) { +func TestAccV2NutanixVolumeGroupsDisksDataSource_Basic(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("terraform-test-volume-group-disk-%d", r) desc := "terraform test volume group disk description" @@ -37,7 +37,7 @@ func TestAccNutanixVolumeGroupsDisksV2DataSource_Basic(t *testing.T) { }) } -func TestAccNutanixVolumeGroupsDisksV2DataSource_WithLimit(t *testing.T) { +func TestAccV2NutanixVolumeGroupsDisksDataSource_WithLimit(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("terraform-test-volume-group-disk-%d", r) desc := "terraform test volume group disk description" diff --git a/nutanix/services/volumesv2/data_source_nutanix_volume_group_iscsi_clients_v2_test.go b/nutanix/services/volumesv2/data_source_nutanix_volume_group_iscsi_clients_v2_test.go index 4f30b278f..4bd24609f 100644 --- a/nutanix/services/volumesv2/data_source_nutanix_volume_group_iscsi_clients_v2_test.go +++ b/nutanix/services/volumesv2/data_source_nutanix_volume_group_iscsi_clients_v2_test.go @@ -11,7 +11,7 @@ import ( const dataSourceVolumeGroupIscsiClients = "data.nutanix_volume_group_iscsi_clients_v2.vg_iscsi_test" -func TestAccNutanixVolumeGroupIscsiClientsV2Datasource_Basic(t *testing.T) { +func TestAccV2NutanixVolumeGroupIscsiClientsDataSource_Basic(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("tf-test-volume-group-disk-%d", r) desc := "terraform test volume group disk description" diff --git a/nutanix/services/volumesv2/data_source_nutanix_volume_group_v2_test.go b/nutanix/services/volumesv2/data_source_nutanix_volume_group_v2_test.go index 029eb6c88..10064d411 100644 --- a/nutanix/services/volumesv2/data_source_nutanix_volume_group_v2_test.go +++ b/nutanix/services/volumesv2/data_source_nutanix_volume_group_v2_test.go @@ -11,7 +11,7 @@ import ( const dataSourceVolumeGroup = "data.nutanix_volume_group_v2.test" -func TestAccNutanixVolumeGroupV2DataSource_Basic(t *testing.T) { +func TestAccV2NutanixVolumeGroupDataSource_Basic(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("terraform-test-volume-group-disk-%d", r) desc := "terraform test volume group disk description" diff --git a/nutanix/services/volumesv2/data_source_nutanix_volume_group_vms_v2_test.go b/nutanix/services/volumesv2/data_source_nutanix_volume_group_vms_v2_test.go index bf0c8c485..9a20e25d6 100644 --- a/nutanix/services/volumesv2/data_source_nutanix_volume_group_vms_v2_test.go +++ b/nutanix/services/volumesv2/data_source_nutanix_volume_group_vms_v2_test.go @@ -11,7 +11,7 @@ import ( const dataSourceVolumeGroupsVmsAttachments = "data.nutanix_volume_group_vms_v2.test" -func TestAccNutanixVolumeGroupVmsAttachmentsV2DataSource_Basic(t *testing.T) { +func TestAccV2NutanixVolumeGroupVmsAttachmentsDataSource_Basic(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("terraform-test-volume-group-disk-%d", r) desc := "terraform test volume group disk description" diff --git a/nutanix/services/volumesv2/data_source_nutanix_volume_groups_v2_test.go b/nutanix/services/volumesv2/data_source_nutanix_volume_groups_v2_test.go index 1519d5361..7aff3f21d 100644 --- a/nutanix/services/volumesv2/data_source_nutanix_volume_groups_v2_test.go +++ b/nutanix/services/volumesv2/data_source_nutanix_volume_groups_v2_test.go @@ -13,7 +13,7 @@ import ( const dataSourceVolumeGroups = "data.nutanix_volume_groups_v2.test" -func TestAccNutanixVolumeGroupsV2DataSource_Basic(t *testing.T) { +func TestAccV2NutanixVolumeGroupsDataSource_Basic(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("terraform-test-volume-group-%d", r) desc := "terraform test volume group description" @@ -33,7 +33,7 @@ func TestAccNutanixVolumeGroupsV2DataSource_Basic(t *testing.T) { }) } -func TestAccNutanixVolumeGroupsV4DataSource_WithFilter(t *testing.T) { +func TestAccV2NutanixVolumeGroupsV4DataSource_WithFilter(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("terraform-test-volume-group-%d", r) desc := "terraform test volume group description" @@ -59,7 +59,7 @@ func TestAccNutanixVolumeGroupsV4DataSource_WithFilter(t *testing.T) { }) } -func TestAccNutanixVolumeGroupsV4DataSource_WithLimit(t *testing.T) { +func TestAccV2NutanixVolumeGroupsV4DataSource_WithLimit(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("terraform-test-volume-group-%d", r) desc := "terraform test volume group description" diff --git a/nutanix/services/volumesv2/data_source_nutanix_volume_iscsi_client_v2_test.go b/nutanix/services/volumesv2/data_source_nutanix_volume_iscsi_client_v2_test.go index c59855290..9e18d0113 100644 --- a/nutanix/services/volumesv2/data_source_nutanix_volume_iscsi_client_v2_test.go +++ b/nutanix/services/volumesv2/data_source_nutanix_volume_iscsi_client_v2_test.go @@ -9,7 +9,7 @@ import ( const dataSourceVolumeIscsiClient = "data.nutanix_volume_iscsi_client_v2.v_iscsi" -func TestAccNutanixVolumeIscsiClientV2Datasource_Basic(t *testing.T) { +func TestAccV2NutanixVolumeIscsiClientDataSource_Basic(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, diff --git a/nutanix/services/volumesv2/data_source_nutanix_volume_iscsi_clients_v2_test.go b/nutanix/services/volumesv2/data_source_nutanix_volume_iscsi_clients_v2_test.go index d9208b95f..45d6dffde 100644 --- a/nutanix/services/volumesv2/data_source_nutanix_volume_iscsi_clients_v2_test.go +++ b/nutanix/services/volumesv2/data_source_nutanix_volume_iscsi_clients_v2_test.go @@ -9,7 +9,7 @@ import ( const dataSourceVolumeIscsiClients = "data.nutanix_volume_iscsi_clients_v2.v_iscsi" -func TestAccNutanixVolumeIscsiClientsV2Datasource_Basic(t *testing.T) { +func TestAccV2NutanixVolumeIscsiClientsDataSource_Basic(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, diff --git a/nutanix/services/volumesv2/resource_nutanix_volume_group_disk_v2_test.go b/nutanix/services/volumesv2/resource_nutanix_volume_group_disk_v2_test.go index 810f4f5b7..0ee155353 100644 --- a/nutanix/services/volumesv2/resource_nutanix_volume_group_disk_v2_test.go +++ b/nutanix/services/volumesv2/resource_nutanix_volume_group_disk_v2_test.go @@ -12,7 +12,7 @@ import ( const resourceVolumeGroupDisk = "nutanix_volume_group_disk_v2.test" -func TestAccNutanixVolumeGroupDiskV2Resource_Basic(t *testing.T) { +func TestAccV2NutanixVolumeGroupDiskResource_Basic(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("tf-test-volume-group-%d", r) desc := "test volume group disk description" diff --git a/nutanix/services/volumesv2/resource_nutanix_volume_group_iscsi_client_v2_test.go b/nutanix/services/volumesv2/resource_nutanix_volume_group_iscsi_client_v2_test.go index 327b002bc..3623deac6 100644 --- a/nutanix/services/volumesv2/resource_nutanix_volume_group_iscsi_client_v2_test.go +++ b/nutanix/services/volumesv2/resource_nutanix_volume_group_iscsi_client_v2_test.go @@ -11,7 +11,7 @@ import ( const resourceVolumeGroupIscsiClient = "nutanix_volume_group_iscsi_client_v2.test" -func TestAccNutanixVolumeGroupIscsiClientV2Resource_Basic(t *testing.T) { +func TestAccV2NutanixVolumeGroupIscsiClientResource_Basic(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("tf-test-volume-group-%d", r) desc := "test volume group Iscsi Client description" diff --git a/nutanix/services/volumesv2/resource_nutanix_volume_group_v2_test.go b/nutanix/services/volumesv2/resource_nutanix_volume_group_v2_test.go index a39f7359f..05ccc8010 100644 --- a/nutanix/services/volumesv2/resource_nutanix_volume_group_v2_test.go +++ b/nutanix/services/volumesv2/resource_nutanix_volume_group_v2_test.go @@ -13,7 +13,7 @@ import ( const resourceNameVolumeGroup = "nutanix_volume_group_v2.test" -func TestAccNutanixVolumeGroupV2Resource_Basic(t *testing.T) { +func TestAccV2NutanixVolumeGroupResource_Basic(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("tf-test-volume-group-%d", r) desc := "test volume group description" @@ -41,7 +41,7 @@ func TestAccNutanixVolumeGroupV2Resource_Basic(t *testing.T) { }) } -func TestAccNutanixVolumeGroupV2Resource_RequiredAttr(t *testing.T) { +func TestAccV2NutanixVolumeGroupResource_RequiredAttr(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("tf-test-volume-group-%d", r) resource.Test(t, resource.TestCase{ @@ -59,7 +59,7 @@ func TestAccNutanixVolumeGroupV2Resource_RequiredAttr(t *testing.T) { }) } -func TestAccNutanixVolumeGroupV2Resource_WithNoName(t *testing.T) { +func TestAccV2NutanixVolumeGroupResource_WithNoName(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, @@ -72,7 +72,7 @@ func TestAccNutanixVolumeGroupV2Resource_WithNoName(t *testing.T) { }) } -func TestAccNutanixVolumeGroupV2Resource_WithNoClusterReference(t *testing.T) { +func TestAccV2NutanixVolumeGroupResource_WithNoClusterReference(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("test-volume-group-%d", r) resource.Test(t, resource.TestCase{ diff --git a/nutanix/services/volumesv2/resource_nutanix_volume_group_vm_v2_test.go b/nutanix/services/volumesv2/resource_nutanix_volume_group_vm_v2_test.go index 6bd4ada02..eee9388f5 100644 --- a/nutanix/services/volumesv2/resource_nutanix_volume_group_vm_v2_test.go +++ b/nutanix/services/volumesv2/resource_nutanix_volume_group_vm_v2_test.go @@ -12,7 +12,7 @@ import ( const resourceVolumeGroupVM = "nutanix_volume_group_vm_v2.test" -func TestAccNutanixVolumeGroupVmV2Resource_Basic(t *testing.T) { +func TestAccV2NutanixVolumeGroupVmResource_Basic(t *testing.T) { r := acctest.RandInt() name := fmt.Sprintf("test-volume-group-%d", r) desc := "test volume group Vm Attachment description"