2024-05-29 21:13:36 +00:00
|
|
|
run "terraform-plan" {
|
|
|
|
command = plan
|
|
|
|
|
|
|
|
variables {
|
|
|
|
application_name = "test-application"
|
|
|
|
namespace = "test-namespace"
|
|
|
|
image = {
|
|
|
|
name = "container.localdomain/test-image"
|
|
|
|
}
|
2024-05-29 21:23:41 +00:00
|
|
|
replicas = 2
|
2024-05-29 21:13:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
assert {
|
|
|
|
condition = var.application_name == "test-application"
|
|
|
|
error_message = "incorrect application name"
|
|
|
|
}
|
|
|
|
|
|
|
|
assert {
|
2024-05-29 21:23:41 +00:00
|
|
|
condition = kubernetes_deployment_v1.deployment.spec[0].replicas == "2"
|
2024-05-29 21:13:36 +00:00
|
|
|
error_message = "invalid number of replicas"
|
|
|
|
}
|
|
|
|
}
|