From a11d7fce4ce3bc2a350c48d7c8200482422af242 Mon Sep 17 00:00:00 2001 From: Jose Antonio Carmona Date: Wed, 10 May 2023 14:02:36 +0200 Subject: [PATCH] [bitnami/jaeger] Add VIB tests (#32653) * [bitnami/jaeger] Add VIB tests Signed-off-by: Jose Antonio Carmona * Trigger VIB Signed-off-by: Jose Antonio Carmona * Add missing runtime_params Signed-off-by: Jose Antonio Carmona * Check stderr instead of stdout Signed-off-by: Jose Antonio Carmona * Revert "Trigger VIB" This reverts commit 9a3f69cf58e9aee0cc9b3926521d6d25714f544f. Signed-off-by: Jose Antonio Carmona --------- Signed-off-by: Jose Antonio Carmona --- .vib/jaeger/goss/goss.yaml | 12 ++++++++++++ .vib/jaeger/goss/jaeger.yaml | 6 ++++++ .vib/jaeger/goss/vars.yaml | 13 +++++++++++++ .vib/jaeger/vib-publish.json | 18 +++++++++++++++++- .vib/jaeger/vib-verify.json | 18 +++++++++++++++++- 5 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 .vib/jaeger/goss/goss.yaml create mode 100644 .vib/jaeger/goss/jaeger.yaml create mode 100644 .vib/jaeger/goss/vars.yaml diff --git a/.vib/jaeger/goss/goss.yaml b/.vib/jaeger/goss/goss.yaml new file mode 100644 index 000000000000..ca786eae87b9 --- /dev/null +++ b/.vib/jaeger/goss/goss.yaml @@ -0,0 +1,12 @@ +gossfile: + # Goss tests exclusive to the current container + ../../jaeger/goss/jaeger.yaml: {} + # Load scripts from .vib/common/goss/templates + ../../common/goss/templates/check-app-version.yaml: {} + ../../common/goss/templates/check-binaries.yaml: {} + ../../common/goss/templates/check-broken-symlinks.yaml: {} + ../../common/goss/templates/check-ca-certs.yaml: {} + ../../common/goss/templates/check-directories.yaml: {} + ../../common/goss/templates/check-linked-libraries.yaml: {} + ../../common/goss/templates/check-sed-in-place.yaml: {} + ../../common/goss/templates/check-spdx.yaml: {} diff --git a/.vib/jaeger/goss/jaeger.yaml b/.vib/jaeger/goss/jaeger.yaml new file mode 100644 index 000000000000..822694e918aa --- /dev/null +++ b/.vib/jaeger/goss/jaeger.yaml @@ -0,0 +1,6 @@ +command: + check-jaeger: + exec: timeout --preserve-status 5 jaeger-all-in-one + exit-status: 0 + stderr: + - Server created \ No newline at end of file diff --git a/.vib/jaeger/goss/vars.yaml b/.vib/jaeger/goss/vars.yaml new file mode 100644 index 000000000000..8a07b322a735 --- /dev/null +++ b/.vib/jaeger/goss/vars.yaml @@ -0,0 +1,13 @@ +binaries: + - jaeger-agent + - jaeger-ingester + - jaeger-query + - jaeger-all-in-one + - jaeger-collector +directories: + - paths: + - /opt/bitnami/jaeger/cassandra-schema +root_dir: /opt/bitnami +version: + bin_name: jaeger-all-in-one + flag: version diff --git a/.vib/jaeger/vib-publish.json b/.vib/jaeger/vib-publish.json index 8b6fe8eab4e6..29dc9e3bf81a 100644 --- a/.vib/jaeger/vib-publish.json +++ b/.vib/jaeger/vib-publish.json @@ -3,7 +3,8 @@ "resources": { "url": "{VIB_ENV_CONTAINER_URL}", "path": "{VIB_ENV_PATH}" - } + }, + "runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd" }, "phases": { "package": { @@ -33,6 +34,21 @@ }, "verify": { "actions": [ + { + "action_id": "goss", + "params": { + "resources": { + "path": "/.vib" + }, + "tests_file": "jaeger/goss/goss.yaml", + "vars_file": "jaeger/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-jaeger" + } + } + } + }, { "action_id": "trivy", "params": { diff --git a/.vib/jaeger/vib-verify.json b/.vib/jaeger/vib-verify.json index a34e8aee9161..1d03f7f2168a 100644 --- a/.vib/jaeger/vib-verify.json +++ b/.vib/jaeger/vib-verify.json @@ -3,7 +3,8 @@ "resources": { "url": "{SHA_ARCHIVE}", "path": "{VIB_ENV_PATH}" - } + }, + "runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd" }, "phases": { "package": { @@ -29,6 +30,21 @@ }, "verify": { "actions": [ + { + "action_id": "goss", + "params": { + "resources": { + "path": "/.vib" + }, + "tests_file": "jaeger/goss/goss.yaml", + "vars_file": "jaeger/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-jaeger" + } + } + } + }, { "action_id": "trivy", "params": {