From 2f2ef651e254f076299e228523cfd3ad91967b8b Mon Sep 17 00:00:00 2001
From: EspenAlbert <espen.albert@mongodb.com>
Date: Mon, 15 Jul 2024 07:45:05 +0100
Subject: [PATCH] test: remove unused clusterName and align fields

---
 .../resource_ldap_configuration_test.go       | 39 +++++++++----------
 1 file changed, 19 insertions(+), 20 deletions(-)

diff --git a/internal/service/ldapconfiguration/resource_ldap_configuration_test.go b/internal/service/ldapconfiguration/resource_ldap_configuration_test.go
index 506764e83b..f9eeba0eac 100644
--- a/internal/service/ldapconfiguration/resource_ldap_configuration_test.go
+++ b/internal/service/ldapconfiguration/resource_ldap_configuration_test.go
@@ -37,7 +37,6 @@ func TestAccLDAPConfiguration_withVerify_CACertificateComplete(t *testing.T) {
 			},
 		})
 		projectID           = clusterInfo.ProjectID
-		clusterName         = clusterInfo.ClusterName
 		clusterTerraformStr = clusterInfo.ClusterTerraformStr
 	)
 
@@ -46,7 +45,7 @@ func TestAccLDAPConfiguration_withVerify_CACertificateComplete(t *testing.T) {
 		ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
 		Steps: []resource.TestStep{
 			{
-				Config: configWithVerify(clusterTerraformStr, clusterInfo.ClusterResourceName, projectID, clusterName, hostname, username, password, caCertificate, cast.ToInt(port), true),
+				Config: configWithVerify(clusterTerraformStr, clusterInfo.ClusterResourceName, projectID, hostname, username, password, caCertificate, cast.ToInt(port), true),
 				Check: resource.ComposeAggregateTestCheckFunc(
 					checkExists(resourceName),
 					resource.TestCheckResourceAttrSet(resourceName, "project_id"),
@@ -162,33 +161,33 @@ func configBasic(projectID, hostname, username, password string, authEnabled boo
 	`, projectID, hostname, username, password, authEnabled, port)
 }
 
-func configWithVerify(clusterTerraformStr, clusterResourceName, projectID, clusterName, hostname, username, password, caCertificate string, port int, authEnabled bool) string {
+func configWithVerify(clusterTerraformStr, clusterResourceName, projectID, hostname, username, password, caCertificate string, port int, authEnabled bool) string {
 	return fmt.Sprintf(`
-%[9]s
+%[8]s
 
 		resource "mongodbatlas_ldap_verify" "test" {
-			project_id                  = %[1]q
-			hostname = %[3]q
-			bind_username                     = %[4]q
-			bind_password                     = %[5]q
-			port                     = %[6]d
+			project_id    = %[1]q
+			hostname      = %[2]q
+			bind_username = %[3]q
+			bind_password = %[4]q
+			port          = %[5]d
 			ca_certificate = <<-EOF
-%[8]s
+%[7]s
 			EOF
 			authz_query_template = "{USER}?memberOf?base"
-			depends_on = [%[10]s]
+			depends_on = [%[9]s]
 		}
 
 		resource "mongodbatlas_ldap_configuration" "test" {
-			project_id                  = %[1]q
-			authorization_enabled                = false
-			hostname = %[3]q
-			bind_username                     = %[4]q
-			bind_password                     = %[5]q
-			port                     = %[6]d
-			authentication_enabled                = %[7]t
+			project_id             = %[1]q
+			authorization_enabled  = false
+			hostname               = %[2]q
+			bind_username          = %[3]q
+			bind_password          = %[4]q
+			port                   = %[5]d
+			authentication_enabled = %[6]t
 			ca_certificate = <<-EOF
-%[8]s
+%[7]s
 			EOF
 			authz_query_template = "{USER}?memberOf?base"
 			user_to_dn_mapping{
@@ -196,5 +195,5 @@ func configWithVerify(clusterTerraformStr, clusterResourceName, projectID, clust
 				ldap_query = "DC=example,DC=com??sub?(userPrincipalName={0})"
 			}
 			depends_on = [mongodbatlas_ldap_verify.test]
-		}`, projectID, clusterName, hostname, username, password, port, authEnabled, caCertificate, clusterTerraformStr, clusterResourceName)
+		}`, projectID, hostname, username, password, port, authEnabled, caCertificate, clusterTerraformStr, clusterResourceName)
 }