From acd922bec27a14c2ed9a5de23cd730df91f985be Mon Sep 17 00:00:00 2001 From: Mauren <698465+stormqueen1990@users.noreply.github.com> Date: Fri, 12 Apr 2024 10:17:44 -0400 Subject: [PATCH] chore(external-secrets): migrate to Docker harness (#2479) Signed-off-by: Mauren Berti --- images/external-secrets/tests/main.tf | 33 +++++++++++++++++++-------- 1 file changed, 24 insertions(+), 9 deletions(-) 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 = {