mirror of
https://github.com/bitnami/containers.git
synced 2026-02-19 05:27:22 +08:00
[bitnami/mongodb] Add MongoDB container VIB tests (#27806)
* [bitnami/mongodb] Add MongoDB container VIB tests Signed-off-by: Michiel <michield@vmware.com>
This commit is contained in:
14
.vib/mongodb/goss/goss.yaml
Normal file
14
.vib/mongodb/goss/goss.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
gossfile:
|
||||
# Goss tests exclusive to the current container
|
||||
../../mongodb/goss/mongodb.yaml: {}
|
||||
# Load scripts from .vib/common/goss/templates
|
||||
../../common/goss/templates/check-app-version.yaml: {}
|
||||
../../common/goss/templates/check-broken-symlinks.yaml: {}
|
||||
../../common/goss/templates/check-ca-certs.yaml: {}
|
||||
../../common/goss/templates/check-binaries.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: {}
|
||||
|
||||
17
.vib/mongodb/goss/mongodb.yaml
Normal file
17
.vib/mongodb/goss/mongodb.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
file:
|
||||
/opt/bitnami/mongodb/mongodb_get_source.txt:
|
||||
mode: "0644"
|
||||
exists: true
|
||||
contains:
|
||||
- This solution ships the official MongoDB Community binaries
|
||||
/opt/bitnami/mongodb/logs/mongodb.log:
|
||||
exists: true
|
||||
filetype: symlink
|
||||
linked-to: /dev/stdout
|
||||
/opt/bitnami/mongodb/conf/mongodb.conf:
|
||||
mode: "0660"
|
||||
exists: true
|
||||
contains:
|
||||
- /port.*27017/
|
||||
- /pidFilePath.*opt/bitnami/mongodb/tmp/mongodb.pid/
|
||||
- /path.*/opt/bitnami/mongodb/logs/mongodb.log/
|
||||
27
.vib/mongodb/goss/vars.yaml
Normal file
27
.vib/mongodb/goss/vars.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
binaries:
|
||||
- gosu
|
||||
- mongod
|
||||
- mongosh
|
||||
- render-template
|
||||
- wait-for-port
|
||||
- yq
|
||||
files:
|
||||
- mode: "0664"
|
||||
paths:
|
||||
- /.dbshell
|
||||
- /.mongoshrc.js
|
||||
- /.mongorc.js
|
||||
directories:
|
||||
- mode: "0775"
|
||||
paths:
|
||||
- /bitnami/mongodb
|
||||
- /bitnami/mongodb/data
|
||||
- /docker-entrypoint-initdb.d
|
||||
- /opt/bitnami/mongodb/conf
|
||||
- /opt/bitnami/mongodb/logs
|
||||
- /opt/bitnami/mongodb/tmp
|
||||
- /.mongodb
|
||||
root_dir: /opt/bitnami
|
||||
version:
|
||||
bin_name: mongod
|
||||
flag: --version
|
||||
@@ -3,7 +3,8 @@
|
||||
"resources": {
|
||||
"url": "{VIB_ENV_CONTAINER_URL}",
|
||||
"path": "{VIB_ENV_PATH}"
|
||||
}
|
||||
},
|
||||
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
|
||||
},
|
||||
"phases": {
|
||||
"package": {
|
||||
@@ -32,6 +33,22 @@
|
||||
},
|
||||
"verify": {
|
||||
"actions": [
|
||||
{
|
||||
"action_id": "goss",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib"
|
||||
},
|
||||
"tests_file": "mongodb/goss/goss.yaml",
|
||||
"vars_file": "mongodb/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-mongodb"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"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": "mongodb/goss/goss.yaml",
|
||||
"vars_file": "mongodb/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-mongodb"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "trivy",
|
||||
"params": {
|
||||
|
||||
Reference in New Issue
Block a user