[bitnami/prometheus] Add VIB tests (#33924)

Signed-off-by: Andrés Bono <andresbono@vmware.com>
This commit is contained in:
Andrés Bono
2023-05-18 16:52:11 +02:00
committed by GitHub
parent e71f2786d8
commit 27720dd821
5 changed files with 75 additions and 2 deletions
+13
View File
@@ -0,0 +1,13 @@
gossfile:
# Goss tests exclusive to the current container
../../prometheus/goss/prometheus.yaml: {}
# Load scripts from .vib/common/goss/templates
../../common/goss/templates/check-app-version.yaml: {}
../../common/goss/templates/check-binaries.yaml: {}
../../common/goss/templates/check-broken-symlinks.yaml: {}
../../common/goss/templates/check-ca-certs.yaml: {}
../../common/goss/templates/check-directories.yaml: {}
../../common/goss/templates/check-files.yaml: {}
../../common/goss/templates/check-linked-libraries.yaml: {}
../../common/goss/templates/check-sed-in-place.yaml: {}
../../common/goss/templates/check-spdx.yaml: {}
+11
View File
@@ -0,0 +1,11 @@
command:
check-config-format:
exec: promtool check config /opt/bitnami/prometheus/conf/prometheus.yml
exit-status: 0
check-prometheus-run:
exec: timeout --preserve-status 5 prometheus --config.file=/opt/bitnami/prometheus/conf/prometheus.yml
timeout: 8000
exit-status: 0
stderr:
- Starting Prometheus Server
- Server is ready
+17
View File
@@ -0,0 +1,17 @@
binaries:
- prometheus
- promtool
directories:
- mode: "0775"
paths:
- /opt/bitnami/prometheus/data
- paths:
- /opt/bitnami/prometheus/conf/console_libraries
- /opt/bitnami/prometheus/conf/consoles
files:
- paths:
- /opt/bitnami/prometheus/conf/prometheus.yml
root_dir: /opt/bitnami
version:
bin_name: prometheus
flag: --version
+17 -1
View File
@@ -3,7 +3,8 @@
"resources": {
"url": "{VIB_ENV_CONTAINER_URL}",
"path": "{VIB_ENV_PATH}"
}
},
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
},
"phases": {
"package": {
@@ -82,6 +83,21 @@
}
}
}
},
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "prometheus/goss/goss.yaml",
"vars_file": "prometheus/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-prometheus"
}
}
}
}
]
},
+17 -1
View File
@@ -3,7 +3,8 @@
"resources": {
"url": "{SHA_ARCHIVE}",
"path": "{VIB_ENV_PATH}"
}
},
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
},
"phases": {
"package": {
@@ -46,6 +47,21 @@
"OS"
]
}
},
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "prometheus/goss/goss.yaml",
"vars_file": "prometheus/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-prometheus"
}
}
}
}
]
}