[bitnami/valkey] Adds test for valkey (#65728)

Adds test for valkey

Signed-off-by: Rafael Rios Saavedra <rrios@vmware.com>
This commit is contained in:
Rafael Ríos Saavedra 2024-04-26 16:42:21 +02:00 committed by GitHub
parent 30461c46c1
commit df5ffa024e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 135 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/goss/valkey.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,31 @@
# Copyright VMware, Inc.
# SPDX-License-Identifier: APACHE-2.0
file:
/opt/bitnami/valkey/etc/valkey.conf:
exists: true
mode: "0664"
contents:
- /port.*6379/
- /dir.*/bitnami/valkey/data/
- /pidfile.*/opt/bitnami/valkey/tmp/valkey.pid/
- "daemonize yes"
command:
check-valkey-server:
exec: valkey-server /opt/bitnami/valkey/etc/valkey.conf && sleep 5 && ps aux
exit-status: 0
timeout: 20000
stdout:
- /valkey-server.*(127.0.0.1|localhost).*6379/
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,16 @@
binaries:
- valkey-cli
- valkey-server
- wait-for-port
directories:
- mode: "0775"
paths:
- /bitnami
- /bitnami/valkey
- /bitnami/valkey/data
- /opt/bitnami/valkey
- /opt/bitnami/valkey/etc
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": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "valkey/goss/goss.yaml",
"vars_file": "valkey/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-valkey"
}
}
}
},
{
"action_id": "trivy",
"params": {
"threshold": "LOW",
"vuln_type": [
"OS"
]
}
},
{
"action_id": "grype",
"params": {
"threshold": "CRITICAL",
"package_type": [
"OS"
]
}
}
]
}
}
}