From a84f11a816605bab686bf9fe30cc88e955e071f1 Mon Sep 17 00:00:00 2001 From: Juan Ariza Toledano Date: Fri, 7 Feb 2025 15:20:07 +0100 Subject: [PATCH] [bitnami/aspnet-min] Add Goss tests (#77077) --- .vib/aspnet-min/goss/aspnet-min.yaml | 8 ++++++++ .vib/aspnet-min/goss/goss.yaml | 13 +++++++++++++ .vib/aspnet-min/goss/vars.yaml | 11 +++++++++++ .vib/aspnet-min/vib-verify.json | 18 +++++++++++++++++- 4 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 .vib/aspnet-min/goss/aspnet-min.yaml create mode 100644 .vib/aspnet-min/goss/goss.yaml create mode 100644 .vib/aspnet-min/goss/vars.yaml diff --git a/.vib/aspnet-min/goss/aspnet-min.yaml b/.vib/aspnet-min/goss/aspnet-min.yaml new file mode 100644 index 000000000000..de28ca9863b1 --- /dev/null +++ b/.vib/aspnet-min/goss/aspnet-min.yaml @@ -0,0 +1,8 @@ +command: + check-dotnet-help: + exec: + - dotnet + - --help + exit-status: 0 + stdout: + - "Usage: dotnet [host-options] [path-to-application]" diff --git a/.vib/aspnet-min/goss/goss.yaml b/.vib/aspnet-min/goss/goss.yaml new file mode 100644 index 000000000000..1773effbcd6c --- /dev/null +++ b/.vib/aspnet-min/goss/goss.yaml @@ -0,0 +1,13 @@ +# Copyright Broadcom, Inc. All Rights Reserved. +# SPDX-License-Identifier: APACHE-2.0 + +gossfile: + # Goss tests exclusive to the current container + ../../aspnet-min/goss/aspnet-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-static.yaml: {} + ../../common/goss/templates/check-libgcc.yaml: {} + ../../common/goss/templates/check-openssl-fips.yaml: {} diff --git a/.vib/aspnet-min/goss/vars.yaml b/.vib/aspnet-min/goss/vars.yaml new file mode 100644 index 000000000000..f2810e554338 --- /dev/null +++ b/.vib/aspnet-min/goss/vars.yaml @@ -0,0 +1,11 @@ +files: + - mode: "0644" + paths: + - /opt/bitnami/os/.spdx-os-aspnet-min.spdx + - /opt/bitnami/aspnet/.spdx-aspnet.spdx + - mode: "0755" + paths: + - /opt/bitnami/aspnet/bin/dotnet +version: + bin_name: dotnet + flag: --info diff --git a/.vib/aspnet-min/vib-verify.json b/.vib/aspnet-min/vib-verify.json index ed4f5cd241ca..dd6ea11cfc41 100644 --- a/.vib/aspnet-min/vib-verify.json +++ b/.vib/aspnet-min/vib-verify.json @@ -3,7 +3,8 @@ "resources": { "url": "{SHA_ARCHIVE}", "path": "{VIB_ENV_PATH}" - } + }, + "runtime_parameters": "Y29tbWFuZDogWyIvc2hhcmVkL2J1c3lib3giLCAic2xlZXAiLCAiMzYwMCJdCg==" }, "phases": { "package": { @@ -33,6 +34,21 @@ }, "verify": { "actions": [ + { + "action_id": "goss", + "params": { + "resources": { + "path": "/.vib" + }, + "tests_file": "aspnet-min/goss/goss.yaml", + "vars_file": "aspnet-min/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-aspnet-min" + } + } + } + }, { "action_id": "trivy", "params": {