terraform-library/tests/main.tftest.hcl

23 lines
497 B
HCL
Raw Normal View History

run "terraform-plan" {
command = plan
variables {
application_name = "test-application"
namespace = "test-namespace"
image = {
name = "container.localdomain/test-image"
}
replicas = 2
}
assert {
condition = var.application_name == "test-application"
error_message = "incorrect application name"
}
assert {
condition = kubernetes_deployment_v1.deployment.spec[0].replicas == "2"
error_message = "invalid number of replicas"
}
}