[bitnami/valkey-cluster] Adds test for valkey-cluster (#68743)

Signed-off-by: Rafael Rios Saavedra <rrios@vmware.com>
This commit is contained in:
Rafael Ríos Saavedra
2024-07-03 15:43:42 +02:00
committed by GitHub
parent 909b774416
commit ff5e9a2119
4 changed files with 139 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0
gossfile:
# Goss tests exclusive to the current container
../../valkey-cluster/goss/valkey-cluster.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: {}

View File

@@ -0,0 +1,32 @@
# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0
file:
/opt/bitnami/valkey/etc/valkey.conf:
exists: true
contents:
- /port.*6379/
- /dir.*/bitnami/valkey/data/
- /pidfile.*/opt/bitnami/valkey/tmp/valkey.pid/
- "daemonize no"
- "cluster-enabled yes"
- /cluster-config-file.*/bitnami/valkey/data/nodes.conf/
command:
check-valkey-server:
exec: timeout --preserve-status 5 valkey-server /opt/bitnami/valkey/etc/valkey.conf
exit-status: 0
timeout: 10000
stdout:
- "Ready to accept connections"
check-valkey-server-ssl:
exec: ldd /opt/bitnami/valkey/bin/valkey-server
exit-status: 0
stdout:
- "libcrypto.so"
- "libssl.so"
check-valkey-cli-ssl:
exec: ldd /opt/bitnami/valkey/bin/valkey-cli
exit-status: 0
stdout:
- "libcrypto.so"
- "libssl.so"

View File

@@ -0,0 +1,18 @@
binaries:
- valkey-cli
- valkey-server
directories:
- mode: "0775"
paths:
- /bitnami/valkey
- /opt/bitnami/valkey
- paths:
- /bitnami/valkey/data
- /opt/bitnami/valkey/etc
files:
- paths:
- /opt/bitnami/valkey/etc/valkey-default.conf
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-cluster/goss/goss.yaml",
"vars_file": "valkey-cluster/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-valkey-cluster"
}
}
}
}
]
}
}
}