mirror of
https://github.com/bitnami/containers.git
synced 2026-02-26 15:57:21 +08:00
[bitnami/clickhouse-operator-*] feat: Add goss tests (#79389)
Signed-off-by: juan131 <juan.ariza@broadcom.com>
This commit is contained in:
committed by
GitHub
parent
dd7576bedd
commit
aaea74d626
@@ -0,0 +1,8 @@
|
||||
command:
|
||||
check-metrics-exporter-help:
|
||||
exec:
|
||||
- metrics-exporter
|
||||
- --help
|
||||
exit-status: 0
|
||||
stderr:
|
||||
- Usage of metrics-exporter
|
||||
9
.vib/clickhouse-operator-metrics-exporter/goss/goss.yaml
Normal file
9
.vib/clickhouse-operator-metrics-exporter/goss/goss.yaml
Normal 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: {}
|
||||
7
.vib/clickhouse-operator-metrics-exporter/goss/vars.yaml
Normal file
7
.vib/clickhouse-operator-metrics-exporter/goss/vars.yaml
Normal 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
|
||||
73
.vib/clickhouse-operator-metrics-exporter/vib-verify.json
Normal file
73
.vib/clickhouse-operator-metrics-exporter/vib-verify.json
Normal 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"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
8
.vib/clickhouse-operator/goss/clickhouse-operator.yaml
Normal file
8
.vib/clickhouse-operator/goss/clickhouse-operator.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
command:
|
||||
check-clickhouse-operator-help:
|
||||
exec:
|
||||
- clickhouse-operator
|
||||
- --help
|
||||
exit-status: 0
|
||||
stderr:
|
||||
- Usage of clickhouse-operator
|
||||
9
.vib/clickhouse-operator/goss/goss.yaml
Normal file
9
.vib/clickhouse-operator/goss/goss.yaml
Normal 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: {}
|
||||
7
.vib/clickhouse-operator/goss/vars.yaml
Normal file
7
.vib/clickhouse-operator/goss/vars.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
files:
|
||||
- mode: "0644"
|
||||
paths:
|
||||
- /opt/bitnami/clickhouse-operator/.spdx-clickhouse-operator.spdx
|
||||
version:
|
||||
bin_name: clickhouse-operator
|
||||
flag: --version
|
||||
73
.vib/clickhouse-operator/vib-verify.json
Normal file
73
.vib/clickhouse-operator/vib-verify.json
Normal 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"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user