Skip to content

Commit

Permalink
fix: Update SSL profile validation conditions and cipher suites in te…
Browse files Browse the repository at this point in the history
…sting.tftest.hcl
  • Loading branch information
gareda committed Sep 29, 2024
1 parent 8034e60 commit 1ce64ff
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/testing.tftest.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}

Expand All @@ -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."
}

Expand Down

0 comments on commit 1ce64ff

Please sign in to comment.