Skip to content

Commit

Permalink
fix: tests of backend address pools
Browse files Browse the repository at this point in the history
  • Loading branch information
gareda committed Jul 27, 2024
1 parent 80b2ea9 commit 7a67d3e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/testing.tftest.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -114,52 +114,52 @@ run "plan" {
#region Backend Address Pools

assert {
condition = length(azurerm_application_gateway_backend_address_pool.main) == length(var.backend_address_pools)
condition = length(azurerm_application_gateway.main.backend_address_pool) == length(var.backend_address_pools)
error_message = "The number of Backend Address Pools is not as expected."
}

assert {
condition = azurerm_application_gateway_backend_address_pool.main[0].name == var.backend_address_pools[0].name
condition = azurerm_application_gateway.main.backend_address_pool[0].name == var.backend_address_pools[0].name
error_message = "The name of the first Backend Address Pool is not as expected."
}

assert {
condition = azurerm_application_gateway_backend_address_pool.main[0].fqdns == null
condition = azurerm_application_gateway.main.backend_address_pool[0].fqdns == null
error_message = "The fqdns of the first Backend Address Pool is not as expected."
}

assert {
condition = azurerm_application_gateway_backend_address_pool.main[0].ip_addresses == null
condition = azurerm_application_gateway.main.backend_address_pool[0].ip_addresses == null
error_message = "The ip_addresses of the first Backend Address Pool is not as expected."
}

assert {
condition = azurerm_application_gateway_backend_address_pool.main[1].name == var.backend_address_pools[1].name
condition = azurerm_application_gateway.main.backend_address_pool[1].name == var.backend_address_pools[1].name
error_message = "The name of the second Backend Address Pool is not as expected."
}

assert {
condition = azurerm_application_gateway_backend_address_pool.main[1].fqdns == var.backend_address_pools[1].fqdns
condition = azurerm_application_gateway.main.backend_address_pool[1].fqdns == var.backend_address_pools[1].fqdns
error_message = "The fqdns of the second Backend Address Pool is not as expected."
}

assert {
condition = azurerm_application_gateway_backend_address_pool.main[1].ip_addresses == null
condition = azurerm_application_gateway.main.backend_address_pool[1].ip_addresses == null
error_message = "The ip_addresses of the second Backend Address Pool is not as expected."
}

assert {
condition = azurerm_application_gateway_backend_address_pool.main[2].name == var.backend_address_pools[2].name
condition = azurerm_application_gateway.main.backend_address_pool[2].name == var.backend_address_pools[2].name
error_message = "The name of the third Backend Address Pool is not as expected."
}

assert {
condition = azurerm_application_gateway_backend_address_pool.main[2].fqdns == null
condition = azurerm_application_gateway.main.backend_address_pool[2].fqdns == null
error_message = "The fqdns of the third Backend Address Pool is not as expected."
}

assert {
condition = azurerm_application_gateway_backend_address_pool.main[2].ip_addresses == var.backend_address_pools[2].ip_addresses
condition = azurerm_application_gateway.main.backend_address_pool[2].ip_addresses == var.backend_address_pools[2].ip_addresses
error_message = "The ip_addresses of the third Backend Address Pool is not as expected."
}
}
Expand Down

0 comments on commit 7a67d3e

Please sign in to comment.