Hello,
I’m testing a terraform module I developed with terraform test. The module is installing a chart helm over a gcp Kubernetes cluster.
In the setup, I create the Kubernetes cluster.
In my run blocks, I do checks on the proper install of the tested module.
tests/my.tftest.hcl... in progress
run "setup_tests"... pass
run "compute_names"... skip
run "helm_release"... skip
tests/my.tftest.hcl... tearing down
tests/my.tftest.hcl... pass
Success! 1 passed, 0 failed, 3 skipped.
As we can see in the output, the cluster is successfully created: “pass” for setup_tests.
On the contrary, the below tests are marked as skipped - although I want them to run, and did not on purpose make them skip.
The structure of my module and tests is described below:
Content of main.tf:
data “google_client_config” “default” {}
module “cluster” {
parameters of the cluster…}
outputs: google_client_config, cluster certificate, … etc
Content of my.tftest.hcl:
run “setup_tests” {
module {
source = "./tests/setup"}
}
4 provider blocks: google, kubernetes, helm, kubectl with parameters fed with the output of main.tf: google_client_config, cluster certificate, … etc
Then: run blocks, with plan or apply command and assertions on the cluster
All my run blocks are being skipped, even the most simple one.
Any idea of what is causing this behavior?
Thanks
