From 4aab399bd260d61fbe17a5b4c1aadbdd26468948 Mon Sep 17 00:00:00 2001 From: Leo Antoli <430982+lantoli@users.noreply.github.com> Date: Mon, 25 Mar 2024 10:42:00 +0100 Subject: [PATCH] fix TestAccFederatedSettingsIdentityProvidersDS_basic (#2070) --- ...e_federated_settings_identity_providers_test.go | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/internal/service/federatedsettingsidentityprovider/data_source_federated_settings_identity_providers_test.go b/internal/service/federatedsettingsidentityprovider/data_source_federated_settings_identity_providers_test.go index 6c44a2dc93..cd15a04105 100644 --- a/internal/service/federatedsettingsidentityprovider/data_source_federated_settings_identity_providers_test.go +++ b/internal/service/federatedsettingsidentityprovider/data_source_federated_settings_identity_providers_test.go @@ -13,7 +13,7 @@ import ( func TestAccFederatedSettingsIdentityProvidersDS_basic(t *testing.T) { var ( - resourceName = "data.mongodbatlas_federated_settings_identity_providers.test" + dataSourceName = "data.mongodbatlas_federated_settings_identity_providers.test" federatedSettingsID = os.Getenv("MONGODB_ATLAS_FEDERATION_SETTINGS_ID") ) @@ -24,16 +24,10 @@ func TestAccFederatedSettingsIdentityProvidersDS_basic(t *testing.T) { { Config: testAccMongoDBAtlasDataSourceFederatedSettingsIdentityProvidersConfig(federatedSettingsID), Check: resource.ComposeTestCheckFunc( - testAccCheckMongoDBAtlasFederatedSettingsIdentityProvidersExists(resourceName), + testAccCheckMongoDBAtlasFederatedSettingsIdentityProvidersExists(dataSourceName), - resource.TestCheckResourceAttrSet(resourceName, "federation_settings_id"), - resource.TestCheckResourceAttrSet(resourceName, "results.#"), - resource.TestCheckResourceAttrSet(resourceName, "results.1.acs_url"), - resource.TestCheckResourceAttrSet(resourceName, "results.0.audience_claim.0"), - resource.TestCheckResourceAttrSet(resourceName, "results.0.client_id"), - resource.TestCheckResourceAttrSet(resourceName, "results.0.groups_claim"), - resource.TestCheckResourceAttrSet(resourceName, "results.0.requested_scopes.0"), - resource.TestCheckResourceAttrSet(resourceName, "results.0.user_claim"), + resource.TestCheckResourceAttrSet(dataSourceName, "federation_settings_id"), + resource.TestCheckResourceAttr(dataSourceName, "results.#", "2"), ), }, },