From eee4b1fc0849974e60f96ddb2e56db110eef74ea Mon Sep 17 00:00:00 2001 From: Juan Ariza Toledano Date: Wed, 29 Jan 2025 10:20:24 +0100 Subject: [PATCH] [bitnami/ruby-min] Add Goss test (#76763) --- .vib/ruby-min/goss/goss.yaml | 12 ++++++++++++ .vib/ruby-min/goss/ruby-min.yaml | 9 +++++++++ .vib/ruby-min/goss/vars.yaml | 7 +++++++ .vib/ruby-min/vib-verify.json | 18 +++++++++++++++++- 4 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 .vib/ruby-min/goss/goss.yaml create mode 100644 .vib/ruby-min/goss/ruby-min.yaml create mode 100644 .vib/ruby-min/goss/vars.yaml diff --git a/.vib/ruby-min/goss/goss.yaml b/.vib/ruby-min/goss/goss.yaml new file mode 100644 index 000000000000..250a88d9b50b --- /dev/null +++ b/.vib/ruby-min/goss/goss.yaml @@ -0,0 +1,12 @@ +# Copyright Broadcom, Inc. All Rights Reserved. +# SPDX-License-Identifier: APACHE-2.0 + +gossfile: + # Goss tests exclusive to the current container + ../../ruby-min/goss/ruby-min.yaml: {} + # Load scripts from .vib/common/goss/templates + ../../common/goss/templates/check-app-version-no-shell-stdout.yaml: {} + ../../common/goss/templates/check-ca-certs.yaml: {} + ../../common/goss/templates/check-files.yaml: {} + ../../common/goss/templates/check-minimal.yaml: {} + ../../common/goss/templates/check-openssl-fips.yaml: {} diff --git a/.vib/ruby-min/goss/ruby-min.yaml b/.vib/ruby-min/goss/ruby-min.yaml new file mode 100644 index 000000000000..eb4d549ab358 --- /dev/null +++ b/.vib/ruby-min/goss/ruby-min.yaml @@ -0,0 +1,9 @@ +command: + check-hello-world: + exec: + - ruby + - -e + - puts 'Hello World' + exit-status: 0 + stdout: + - "Hello World" diff --git a/.vib/ruby-min/goss/vars.yaml b/.vib/ruby-min/goss/vars.yaml new file mode 100644 index 000000000000..9c780156a79f --- /dev/null +++ b/.vib/ruby-min/goss/vars.yaml @@ -0,0 +1,7 @@ +files: + - mode: "0644" + paths: + - /opt/bitnami/ruby/.spdx-ruby-min.spdx +version: + bin_name: ruby + flag: --version diff --git a/.vib/ruby-min/vib-verify.json b/.vib/ruby-min/vib-verify.json index ed4f5cd241ca..6065eeebbe3b 100644 --- a/.vib/ruby-min/vib-verify.json +++ b/.vib/ruby-min/vib-verify.json @@ -3,7 +3,8 @@ "resources": { "url": "{SHA_ARCHIVE}", "path": "{VIB_ENV_PATH}" - } + }, + "runtime_parameters": "Y29tbWFuZDogWyJydWJ5IiwgIi1lIiwgInNsZWVwIDM2MDAiXQo=" }, "phases": { "package": { @@ -33,6 +34,21 @@ }, "verify": { "actions": [ + { + "action_id": "goss", + "params": { + "resources": { + "path": "/.vib" + }, + "tests_file": "ruby-min/goss/goss.yaml", + "vars_file": "ruby-min/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-ruby-min" + } + } + } + }, { "action_id": "trivy", "params": {