[bitnami/mysql] Add VIB tests (#28155)

* [bitnami/mysql] Add VIB tests

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Remove file check affecting only one major

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Remove VIB trigger

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Add goss to publish pipeline

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Add missing symlink test

Signed-off-by: FraPazGal <fdepaz@vmware.com>

---------

Signed-off-by: FraPazGal <fdepaz@vmware.com>
This commit is contained in:
Francisco de Paz Galan 2023-03-29 13:19:05 +02:00 committed by GitHub
parent df88b6b183
commit c18b70c70c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 83 additions and 2 deletions

13
.vib/mysql/goss/goss.yaml Normal file
View File

@ -0,0 +1,13 @@
gossfile:
# Goss tests exclusive to the current container
../../mysql/goss/mysql.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,11 @@
file:
# Checks there is a template already loaded as a config file
/opt/bitnami/mysql/conf/my.cnf:
exists: true
filetype: file
contains:
- socket=/opt/bitnami/mysql/tmp/mysql.sock
/opt/bitnami/mysql/logs/mysqld.log:
exists: true
filetype: symlink
linked-to: /dev/stdout

25
.vib/mysql/goss/vars.yaml Normal file
View File

@ -0,0 +1,25 @@
binaries:
- gosu
- ini-file
- mysql
- mysql_config
- mysqld_safe
- mysqldumpslow
- mysqld_multi
directories:
- mode: "0775"
paths:
- /bitnami/mysql
- /bitnami/mysql/data
- /opt/bitnami/mysql/conf
- /opt/bitnami/mysql/conf/bitnami
- /opt/bitnami/mysql/logs
- /opt/bitnami/mysql/tmp
- /.mysqlsh
files:
- paths:
- /opt/bitnami/mysql/lib/plugin/authentication_ldap_sasl_client.so
root_dir: /opt/bitnami
version:
bin_name: mysql
flag: --version

View File

@ -3,7 +3,8 @@
"resources": {
"url": "{VIB_ENV_CONTAINER_URL}",
"path": "{VIB_ENV_PATH}"
}
},
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
},
"phases": {
"package": {
@ -51,6 +52,21 @@
]
}
},
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "mysql/goss/goss.yaml",
"vars_file": "mysql/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-mysql"
}
}
}
},
{
"action_id": "osspi-application",
"params": {

View File

@ -3,7 +3,8 @@
"resources": {
"url": "{SHA_ARCHIVE}",
"path": "{VIB_ENV_PATH}"
}
},
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
},
"phases": {
"package": {
@ -46,6 +47,21 @@
"OS"
]
}
},
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "mysql/goss/goss.yaml",
"vars_file": "mysql/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-mysql"
}
}
}
}
]
}