From 1ce64ff19e4a6b83448bda60228355bc403a0b8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garrido=20S=C3=A1nchez?= Date: Sun, 29 Sep 2024 07:55:08 +0000 Subject: [PATCH] fix: Update SSL profile validation conditions and cipher suites in testing.tftest.hcl --- tests/testing.tftest.hcl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/testing.tftest.hcl b/tests/testing.tftest.hcl index 1f4910e..bf823fa 100644 --- a/tests/testing.tftest.hcl +++ b/tests/testing.tftest.hcl @@ -357,12 +357,12 @@ run "plan" { } assert { - condition = { for profile in azurerm_application_gateway.main.ssl_profile : profile.name => profile }["ssl-profile-1"].ssl_policy.policy_type == var.ssl_profiles[0].policy_type + condition = { for profile in azurerm_application_gateway.main.ssl_profile : profile.name => profile }["ssl-profile-1"].ssl_policy[0].policy_type == var.ssl_profiles[0].policy_type error_message = "The policy_type of the first SSL Profile is not as expected." } assert { - condition = { for profile in azurerm_application_gateway.main.ssl_profile : profile.name => profile }["ssl-profile-1"].ssl_policy.policy_name == var.ssl_profiles[0].policy_name + condition = { for profile in azurerm_application_gateway.main.ssl_profile : profile.name => profile }["ssl-profile-1"].ssl_policy[0].policy_name == var.ssl_profiles[0].policy_name error_message = "The policy_name of the first SSL Profile is not as expected." } @@ -372,17 +372,17 @@ run "plan" { } assert { - condition = { for profile in azurerm_application_gateway.main.ssl_profile : profile.name => profile }["ssl-profile-2"].ssl_policy.policy_type == var.ssl_profiles[1].policy_type + condition = { for profile in azurerm_application_gateway.main.ssl_profile : profile.name => profile }["ssl-profile-2"].ssl_policy[0].policy_type == var.ssl_profiles[1].policy_type error_message = "The policy_type of the second SSL Profile is not as expected." } assert { - condition = { for profile in azurerm_application_gateway.main.ssl_profile : profile.name => profile }["ssl-profile-2"].ssl_policy.min_protocol_version == var.ssl_profiles[1].min_protocol_version + condition = { for profile in azurerm_application_gateway.main.ssl_profile : profile.name => profile }["ssl-profile-2"].ssl_policy[0].min_protocol_version == var.ssl_profiles[1].min_protocol_version error_message = "The min_protocol_version of the second SSL Profile is not as expected." } assert { - condition = { for profile in azurerm_application_gateway.main.ssl_profile : profile.name => profile }["ssl-profile-2"].ssl_policy.cipher_suites == toset(var.ssl_profiles[1].cipher_suites) + condition = tolist({ for profile in azurerm_application_gateway.main.ssl_profile : profile.name => profile }["ssl-profile-2"].ssl_policy[0].cipher_suites) == var.ssl_profiles[1].cipher_suites error_message = "The cipher_suites of the second SSL Profile is not as expected." }