[bitnami/valkey-sentinel] Adds tests for valkey-sentinel (#65765)

Signed-off-by: Rafael Rios Saavedra <rrios@vmware.com>
This commit is contained in:
Rafael Ríos Saavedra
2024-04-30 10:01:48 +02:00
committed by GitHub
parent 88762035fa
commit 454f7c4291
4 changed files with 133 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
# Copyright VMware, Inc.
# SPDX-License-Identifier: APACHE-2.0
gossfile:
# Goss tests exclusive to the current container
../../valkey-sentinel/goss/valkey-sentinel.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-linked-libraries.yaml: {}
../../common/goss/templates/check-sed-in-place.yaml: {}
../../common/goss/templates/check-spdx.yaml: {}

View File

@@ -0,0 +1,28 @@
# Copyright VMware, Inc.
# SPDX-License-Identifier: APACHE-2.0
file:
/opt/bitnami/valkey-sentinel/etc/sentinel.conf:
exists: true
contents:
- "port 26379"
- "bind 0.0.0.0"
- /pidfile.*/opt/bitnami/valkey-sentinel/tmp/valkey-sentinel.pid/
- "daemonize no"
- 'logfile ""'
command:
check-valkey-server:
exec: timeout --preserve-status 5 valkey-server /opt/bitnami/valkey-sentinel/etc/sentinel.conf --sentinel
exit-status: 0
timeout: 10000
stdout:
- "Configuration loaded"
- /monitor.*quorum/
{{ range $binary := .Vars.binaries }}
check-{{ $binary }}-ssl:
exec: ldd /opt/bitnami/valkey-sentinel/bin/{{ $binary }}
exit-status: 0
stdout:
- "libcrypto.so"
- "libssl.so"
{{ end }}

View File

@@ -0,0 +1,17 @@
binaries:
- valkey-cli
- valkey-server
- valkey-sentinel
directories:
- mode: "0775"
paths:
- /bitnami/valkey-sentinel
- /bitnami/valkey-sentinel/conf
- /opt/bitnami/valkey-sentinel
- /opt/bitnami/valkey-sentinel/etc
- /opt/bitnami/valkey-sentinel/logs
- /opt/bitnami/valkey-sentinel/tmp
root_dir: /opt/bitnami
version:
bin_name: valkey-server
flag: --version

View File

@@ -0,0 +1,73 @@
{
"context": {
"resources": {
"url": "{SHA_ARCHIVE}",
"path": "{VIB_ENV_PATH}"
},
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
},
"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": "trivy",
"params": {
"threshold": "LOW",
"vuln_type": [
"OS"
]
}
},
{
"action_id": "grype",
"params": {
"threshold": "CRITICAL",
"package_type": [
"OS"
]
}
},
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "valkey-sentinel/goss/goss.yaml",
"vars_file": "valkey-sentinel/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-valkey-sentinel"
}
}
}
}
]
}
}
}