From 26b64be3fc44b78ed6e22491d1c005b5f3e3387c Mon Sep 17 00:00:00 2001 From: Francisco de Paz Galan Date: Tue, 18 Apr 2023 13:59:07 +0200 Subject: [PATCH] [bitnami/postgres-exporter] Add VIB tests (#30753) * [bitnami/postgres-exporter] Add VIB tests Signed-off-by: FraPazGal * Remove VIB trigger Signed-off-by: FraPazGal --------- Signed-off-by: FraPazGal --- .vib/postgres-exporter/goss/goss.yaml | 9 +++++++++ .vib/postgres-exporter/goss/vars.yaml | 6 ++++++ .vib/postgres-exporter/vib-publish.json | 24 ++++++++++++++++++++---- .vib/postgres-exporter/vib-verify.json | 18 +++++++++++++++++- 4 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 .vib/postgres-exporter/goss/goss.yaml create mode 100644 .vib/postgres-exporter/goss/vars.yaml diff --git a/.vib/postgres-exporter/goss/goss.yaml b/.vib/postgres-exporter/goss/goss.yaml new file mode 100644 index 000000000000..f93077f81df9 --- /dev/null +++ b/.vib/postgres-exporter/goss/goss.yaml @@ -0,0 +1,9 @@ +gossfile: + # 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-linked-libraries.yaml: {} + ../../common/goss/templates/check-sed-in-place.yaml: {} + ../../common/goss/templates/check-spdx.yaml: {} diff --git a/.vib/postgres-exporter/goss/vars.yaml b/.vib/postgres-exporter/goss/vars.yaml new file mode 100644 index 000000000000..cedd53071e32 --- /dev/null +++ b/.vib/postgres-exporter/goss/vars.yaml @@ -0,0 +1,6 @@ +binaries: + - postgres_exporter +root_dir: /opt/bitnami +version: + bin_name: postgres_exporter + flag: --version diff --git a/.vib/postgres-exporter/vib-publish.json b/.vib/postgres-exporter/vib-publish.json index 8b6fe8eab4e6..06aa8ce82408 100644 --- a/.vib/postgres-exporter/vib-publish.json +++ b/.vib/postgres-exporter/vib-publish.json @@ -3,7 +3,8 @@ "resources": { "url": "{VIB_ENV_CONTAINER_URL}", "path": "{VIB_ENV_PATH}" - } + }, + "runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd" }, "phases": { "package": { @@ -77,9 +78,24 @@ "url": "{VIB_ENV_PACKAGES_JSON_URL}", "path": "/{VIB_ENV_PATH}", "authn": { - "header": "Authorization", - "token": "Bearer {VIB_ENV_GITHUB_TOKEN}" - } + "header": "Authorization", + "token": "Bearer {VIB_ENV_GITHUB_TOKEN}" + } + } + } + }, + { + "action_id": "goss", + "params": { + "resources": { + "path": "/.vib" + }, + "tests_file": "postgres-exporter/goss/goss.yaml", + "vars_file": "postgres-exporter/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-postgres-exporter" + } } } } diff --git a/.vib/postgres-exporter/vib-verify.json b/.vib/postgres-exporter/vib-verify.json index a34e8aee9161..88cea4179746 100644 --- a/.vib/postgres-exporter/vib-verify.json +++ b/.vib/postgres-exporter/vib-verify.json @@ -3,7 +3,8 @@ "resources": { "url": "{SHA_ARCHIVE}", "path": "{VIB_ENV_PATH}" - } + }, + "runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd" }, "phases": { "package": { @@ -46,6 +47,21 @@ "OS" ] } + }, + { + "action_id": "goss", + "params": { + "resources": { + "path": "/.vib" + }, + "tests_file": "postgres-exporter/goss/goss.yaml", + "vars_file": "postgres-exporter/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-postgres-exporter" + } + } + } } ] }