[bitnami/clickhouse-operator-*] feat: Add goss tests (#79389)

Signed-off-by: juan131 <juan.ariza@broadcom.com>
This commit is contained in:
Juan Ariza Toledano
2025-04-02 16:35:22 +02:00
committed by GitHub
parent dd7576bedd
commit aaea74d626
8 changed files with 194 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
command:
check-metrics-exporter-help:
exec:
- metrics-exporter
- --help
exit-status: 0
stderr:
- Usage of metrics-exporter

View File

@@ -0,0 +1,9 @@
# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0
gossfile:
# Goss tests exclusive to the current container
../../clickhouse-operator-metrics-exporter/goss/clickhouse-operator-metrics-exporter.yaml: {}
# Load scripts from .vib/common/goss/templates
../../common/goss/templates/check-ca-certs.yaml: {}
../../common/goss/templates/check-files.yaml: {}

View File

@@ -0,0 +1,7 @@
files:
- mode: "0644"
paths:
- /opt/bitnami/clickhouse-operator-metrics-exporter/.spdx-clickhouse-operator-metrics-exporter.spdx
version:
bin_name: metrics-exporter
flag: --version

View File

@@ -0,0 +1,73 @@
{
"context": {
"resources": {
"url": "{SHA_ARCHIVE}",
"path": "{VIB_ENV_PATH}"
},
"runtime_parameters": "Y29tbWFuZDogWyIvc2hhcmVkL2J1c3lib3giLCAic2xlZXAiLCAiMzYwMCJdCg=="
},
"phases": {
"package": {
"actions": [
{
"action_id": "container-image-package",
"params": {
"application": {
"details": {
"name": "{VIB_ENV_CONTAINER}",
"tag": "{VIB_ENV_TAG}"
}
},
"architectures": [
"linux/amd64",
"linux/arm64"
]
}
},
{
"action_id": "container-image-lint",
"params": {
"threshold": "error"
}
}
]
},
"verify": {
"actions": [
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "clickhouse-operator-metrics-exporter/goss/goss.yaml",
"vars_file": "clickhouse-operator-metrics-exporter/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-clickhouse-operator-metrics-exporter"
}
}
}
},
{
"action_id": "trivy",
"params": {
"threshold": "LOW",
"vuln_type": [
"OS"
]
}
},
{
"action_id": "grype",
"params": {
"threshold": "CRITICAL",
"package_type": [
"OS"
]
}
}
]
}
}
}

View File

@@ -0,0 +1,8 @@
command:
check-clickhouse-operator-help:
exec:
- clickhouse-operator
- --help
exit-status: 0
stderr:
- Usage of clickhouse-operator

View File

@@ -0,0 +1,9 @@
# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0
gossfile:
# Goss tests exclusive to the current container
../../clickhouse-operator/goss/clickhouse-operator.yaml: {}
# Load scripts from .vib/common/goss/templates
../../common/goss/templates/check-ca-certs.yaml: {}
../../common/goss/templates/check-files.yaml: {}

View File

@@ -0,0 +1,7 @@
files:
- mode: "0644"
paths:
- /opt/bitnami/clickhouse-operator/.spdx-clickhouse-operator.spdx
version:
bin_name: clickhouse-operator
flag: --version

View File

@@ -0,0 +1,73 @@
{
"context": {
"resources": {
"url": "{SHA_ARCHIVE}",
"path": "{VIB_ENV_PATH}"
},
"runtime_parameters": "Y29tbWFuZDogWyIvc2hhcmVkL2J1c3lib3giLCAic2xlZXAiLCAiMzYwMCJdCg=="
},
"phases": {
"package": {
"actions": [
{
"action_id": "container-image-package",
"params": {
"application": {
"details": {
"name": "{VIB_ENV_CONTAINER}",
"tag": "{VIB_ENV_TAG}"
}
},
"architectures": [
"linux/amd64",
"linux/arm64"
]
}
},
{
"action_id": "container-image-lint",
"params": {
"threshold": "error"
}
}
]
},
"verify": {
"actions": [
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "clickhouse-operator/goss/goss.yaml",
"vars_file": "clickhouse-operator/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-clickhouse-operator"
}
}
}
},
{
"action_id": "trivy",
"params": {
"threshold": "LOW",
"vuln_type": [
"OS"
]
}
},
{
"action_id": "grype",
"params": {
"threshold": "CRITICAL",
"package_type": [
"OS"
]
}
}
]
}
}
}