From e72629bbcd4a4d8174c1a8396f66677d1bbf59c6 Mon Sep 17 00:00:00 2001 From: Michiel Date: Wed, 15 Mar 2023 16:22:57 +0100 Subject: [PATCH] [bitnami/codeigniter] Add codeigniter tests (#24225) * [bitnami/codeigniter] Add verification tests for Codeigniter container Signed-off-by: Michiel --- .vib/codeigniter/goss/codeigniter.yaml | 7 +++++++ .vib/codeigniter/goss/goss.yaml | 11 +++++++++++ .vib/codeigniter/goss/vars.yaml | 13 +++++++++++++ .vib/codeigniter/vib-publish.json | 18 +++++++++++++++++- .vib/codeigniter/vib-verify.json | 18 +++++++++++++++++- 5 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 .vib/codeigniter/goss/codeigniter.yaml create mode 100644 .vib/codeigniter/goss/goss.yaml create mode 100644 .vib/codeigniter/goss/vars.yaml diff --git a/.vib/codeigniter/goss/codeigniter.yaml b/.vib/codeigniter/goss/codeigniter.yaml new file mode 100644 index 000000000000..2a98b7a118ec --- /dev/null +++ b/.vib/codeigniter/goss/codeigniter.yaml @@ -0,0 +1,7 @@ +command: + # The spark serve command is working + check-server: + exec: timeout 2s /opt/bitnami/codeigniter/spark serve | tail -n2 + exit-status: 0 + stdout: + - started diff --git a/.vib/codeigniter/goss/goss.yaml b/.vib/codeigniter/goss/goss.yaml new file mode 100644 index 000000000000..d23b72c7377f --- /dev/null +++ b/.vib/codeigniter/goss/goss.yaml @@ -0,0 +1,11 @@ +gossfile: + # Goss tests exclusive to the current container + ../../codeigniter/goss/codeigniter.yaml: {} + # Load scripts from .vib/common/goss/templates + ../../common/goss/templates/check-app-version.yaml: {} + ../../common/goss/templates/check-broken-symlinks.yaml: {} + ../../common/goss/templates/check-ca-certs.yaml: {} + ../../common/goss/templates/check-binaries.yaml: {} + ../../common/goss/templates/check-directories.yaml: {} + ../../common/goss/templates/check-linked-libraries.yaml: {} + ../../common/goss/templates/check-sed-in-place.yaml: {} \ No newline at end of file diff --git a/.vib/codeigniter/goss/vars.yaml b/.vib/codeigniter/goss/vars.yaml new file mode 100644 index 000000000000..56a29e306f86 --- /dev/null +++ b/.vib/codeigniter/goss/vars.yaml @@ -0,0 +1,13 @@ +binaries: + - composer + - php-fpm + - gosu + - mysql +directories: + - mode: "0775" + paths: + - /app +root_dir: /opt/bitnami +version: + bin_name: /opt/bitnami/codeigniter/spark + flag: --version \ No newline at end of file diff --git a/.vib/codeigniter/vib-publish.json b/.vib/codeigniter/vib-publish.json index b95e5f947244..14af7c89b065 100644 --- a/.vib/codeigniter/vib-publish.json +++ b/.vib/codeigniter/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": "codeigniter/goss/goss.yaml", + "vars_file": "codeigniter/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-codeigniter" + } + } + } + }, { "action_id": "trivy", "params": { diff --git a/.vib/codeigniter/vib-verify.json b/.vib/codeigniter/vib-verify.json index 835cd556e241..6a25084b581f 100644 --- a/.vib/codeigniter/vib-verify.json +++ b/.vib/codeigniter/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": "codeigniter/goss/goss.yaml", + "vars_file": "codeigniter/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-codeigniter" + } + } + } + }, { "action_id": "trivy", "params": {