23 lines
497 B
HCL
23 lines
497 B
HCL
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"
|
|
}
|
|
}
|