mirror of
https://github.com/bitnami/containers.git
synced 2026-02-15 17:37:22 +08:00
[bitnami/nats] Add VIB tests (#34551)
* [bitnami/nats] Add VIB tests Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com> * Trigger VIB Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com> * Increase timeout Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com> * Check stderr Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com> * Remove VIB trigger Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com> * Apply feedback Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com> * Trigger VIB Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com> * Remove trigger Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com> --------- Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com>
This commit is contained in:
committed by
GitHub
parent
a8c08bdee4
commit
1d8eb4cef0
12
.vib/nats/goss/goss.yaml
Normal file
12
.vib/nats/goss/goss.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
gossfile:
|
||||
# Goss tests exclusive to the current container
|
||||
../../nats/goss/nats.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: {}
|
||||
19
.vib/nats/goss/nats.yaml
Normal file
19
.vib/nats/goss/nats.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
command:
|
||||
check-nats-server:
|
||||
exec: timeout --preserve-status 5 nats-server
|
||||
timeout: 10000
|
||||
exit-status: 1
|
||||
stderr:
|
||||
- "Listening for client connections"
|
||||
- "Server is ready"
|
||||
file:
|
||||
/opt/bitnami/nats/conf/nats-server.conf:
|
||||
exists: true
|
||||
filetype: file
|
||||
mode: "0664"
|
||||
contains:
|
||||
- /listen.*4222/
|
||||
/opt/bitnami/nats/logs/nats-server.log:
|
||||
exists: true
|
||||
filetype: symlink
|
||||
linked-to: /dev/stdout
|
||||
18
.vib/nats/goss/vars.yaml
Normal file
18
.vib/nats/goss/vars.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
binaries:
|
||||
- nats-server
|
||||
- render-template
|
||||
directories:
|
||||
- mode: "0775"
|
||||
paths:
|
||||
- /bitnami/nats
|
||||
- /bitnami/nats/data
|
||||
- /bitnami/nats/conf
|
||||
- /opt/bitnami/nats
|
||||
- /opt/bitnami/nats/conf
|
||||
- /opt/bitnami/nats/logs
|
||||
- /opt/bitnami/nats/tmp
|
||||
- /docker-entrypoint-initdb.d
|
||||
root_dir: /opt/bitnami
|
||||
version:
|
||||
bin_name: nats-server
|
||||
flag: --version
|
||||
@@ -3,7 +3,8 @@
|
||||
"resources": {
|
||||
"url": "{VIB_ENV_CONTAINER_URL}",
|
||||
"path": "{VIB_ENV_PATH}"
|
||||
}
|
||||
},
|
||||
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
|
||||
},
|
||||
"phases": {
|
||||
"package": {
|
||||
@@ -33,6 +34,21 @@
|
||||
},
|
||||
"verify": {
|
||||
"actions": [
|
||||
{
|
||||
"action_id": "goss",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib"
|
||||
},
|
||||
"tests_file": "nats/goss/goss.yaml",
|
||||
"vars_file": "nats/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-nats"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "trivy",
|
||||
"params": {
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
"resources": {
|
||||
"url": "{SHA_ARCHIVE}",
|
||||
"path": "{VIB_ENV_PATH}"
|
||||
}
|
||||
},
|
||||
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
|
||||
},
|
||||
"phases": {
|
||||
"package": {
|
||||
@@ -29,6 +30,21 @@
|
||||
},
|
||||
"verify": {
|
||||
"actions": [
|
||||
{
|
||||
"action_id": "goss",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib"
|
||||
},
|
||||
"tests_file": "nats/goss/goss.yaml",
|
||||
"vars_file": "nats/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-nats"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "trivy",
|
||||
"params": {
|
||||
|
||||
Reference in New Issue
Block a user