diff --git a/images/external-secrets/tests/main.tf b/images/external-secrets/tests/main.tf index 3d9eb5f707..0973e386fa 100644 --- a/images/external-secrets/tests/main.tf +++ b/images/external-secrets/tests/main.tf @@ -13,19 +13,34 @@ data "oci_string" "ref" { input = var.digest } -# TODO: Convert this to imagetest_harness_container when ready -data "oci_exec_test" "version" { - digest = var.digest - script = <&1 || true ) | grep external-secrets - EOF +data "imagetest_inventory" "this" {} + +resource "imagetest_harness_docker" "this" { + name = "external-secrets-container" + inventory = data.imagetest_inventory.this + + envs = { + IMAGE_NAME : var.digest + } } -data "imagetest_inventory" "this" {} +resource "imagetest_feature" "this" { + harness = imagetest_harness_docker.this + name = "basic container test" + description = "basic container test to verify that things run as expected" + + steps = [ + { + name = "Run container" + cmd = <&1 +EOT + } + ] +} resource "imagetest_harness_k3s" "this" { - name = "external-secrets" + name = "external-secrets-k3s" inventory = data.imagetest_inventory.this sandbox = {