From e730ad42cf88381d462e94a723bc40552ad4bc6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Bono?= Date: Tue, 16 May 2023 13:25:34 +0200 Subject: [PATCH] [bitnami/gotrue] Add VIB tests (#33351) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [bitnami/gotrue] Add VIB tests Signed-off-by: Andrés Bono * Apply suggestions from review Signed-off-by: Andrés Bono --------- Signed-off-by: Andrés Bono --- .vib/gotrue/goss/goss.yaml | 10 ++++++++++ .vib/gotrue/goss/gotrue.yaml | 10 ++++++++++ .vib/gotrue/goss/vars.yaml | 3 +++ .vib/gotrue/vib-publish.json | 18 +++++++++++++++++- .vib/gotrue/vib-verify.json | 18 +++++++++++++++++- 5 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 .vib/gotrue/goss/goss.yaml create mode 100644 .vib/gotrue/goss/gotrue.yaml create mode 100644 .vib/gotrue/goss/vars.yaml diff --git a/.vib/gotrue/goss/goss.yaml b/.vib/gotrue/goss/goss.yaml new file mode 100644 index 000000000000..76ddec5a16d9 --- /dev/null +++ b/.vib/gotrue/goss/goss.yaml @@ -0,0 +1,10 @@ +gossfile: + # Goss tests exclusive to the current container + ../../gotrue/goss/gotrue.yaml: {} + # Load scripts from .vib/common/goss/templates + ../../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/gotrue/goss/gotrue.yaml b/.vib/gotrue/goss/gotrue.yaml new file mode 100644 index 000000000000..792e4b20ed5a --- /dev/null +++ b/.vib/gotrue/goss/gotrue.yaml @@ -0,0 +1,10 @@ +command: + # Migration files should be present + check-migrations-files: + exec: find /opt/bitnami/gotrue -name "*.sql" | wc -l + exit-status: 0 + stdout: + - /^[1-9]/ + check-gotrue-help: + exec: gotrue help + exit-status: 0 diff --git a/.vib/gotrue/goss/vars.yaml b/.vib/gotrue/goss/vars.yaml new file mode 100644 index 000000000000..ab1e1531ebfa --- /dev/null +++ b/.vib/gotrue/goss/vars.yaml @@ -0,0 +1,3 @@ +binaries: + - gotrue +root_dir: /opt/bitnami diff --git a/.vib/gotrue/vib-publish.json b/.vib/gotrue/vib-publish.json index 1e2aad8ef471..b3cf6a864f47 100644 --- a/.vib/gotrue/vib-publish.json +++ b/.vib/gotrue/vib-publish.json @@ -3,7 +3,8 @@ "resources": { "url": "{VIB_ENV_CONTAINER_URL}", "path": "{VIB_ENV_PATH}" - } + }, + "runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd" }, "phases": { "package": { @@ -69,6 +70,21 @@ } } } + }, + { + "action_id": "goss", + "params": { + "resources": { + "path": "/.vib" + }, + "tests_file": "gotrue/goss/goss.yaml", + "vars_file": "gotrue/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-gotrue" + } + } + } } ] }, diff --git a/.vib/gotrue/vib-verify.json b/.vib/gotrue/vib-verify.json index a34e8aee9161..10e0a536f29e 100644 --- a/.vib/gotrue/vib-verify.json +++ b/.vib/gotrue/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": "gotrue/goss/goss.yaml", + "vars_file": "gotrue/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-gotrue" + } + } + } } ] }