[bitnami/phpmyadmin] Add VIB tests (#33416)
Signed-off-by: Marcos Bjoerkelund <marcosbd@vmware.com>
This commit is contained in:
parent
b67a236b0b
commit
9ed36ecbd3
|
|
@ -0,0 +1,13 @@
|
|||
gossfile:
|
||||
# Goss tests exclusive to the current container
|
||||
../../phpmyadmin/goss/phpmyadmin.yaml: {}
|
||||
# Load scripts from .vib/common/goss/templates
|
||||
../../common/goss/templates/check-apache-libphp.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: {}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
command:
|
||||
check-app-version:
|
||||
exec: grep '"version":' /opt/bitnami/phpmyadmin/package.json
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- '"version": "{{ .Env.APP_VERSION }}",'
|
||||
check-enabled-modules:
|
||||
exec: php -m
|
||||
exit-status: 0
|
||||
stdout:
|
||||
{{ range $module := .Vars.phpmodules }}
|
||||
- "{{ $module }}"
|
||||
{{ end }}
|
||||
file:
|
||||
/opt/bitnami/php/etc/php.ini:
|
||||
exists: true
|
||||
filetype: file
|
||||
contains:
|
||||
- post_max_size = 80M
|
||||
- upload_max_filesize = 80M
|
||||
# HTTP vhost should have been properly rendered
|
||||
/opt/bitnami/apache/conf/vhosts/phpmyadmin-vhost.conf:
|
||||
exists: true
|
||||
filetype: file
|
||||
contains:
|
||||
- /DocumentRoot.*/opt/bitnami/phpmyadmin/
|
||||
# HTTPS vhost should have been properly rendered
|
||||
/opt/bitnami/apache/conf/vhosts/phpmyadmin-https-vhost.conf:
|
||||
exists: true
|
||||
filetype: file
|
||||
contains:
|
||||
- "SSLEngine on"
|
||||
- /DocumentRoot.*/opt/bitnami/phpmyadmin/
|
||||
# Default phpMyAdmin configurations
|
||||
/opt/bitnami/phpmyadmin/config.inc.php:
|
||||
exists: true
|
||||
filetype: file
|
||||
contains:
|
||||
- "$cfg['Servers'][$i]['host'] = 'mariadb';"
|
||||
- "$cfg['AllowArbitraryServer'] = false;"
|
||||
- "$cfg['Servers'][$i]['AllowNoPassword'] = true;"
|
||||
group:
|
||||
daemon:
|
||||
exists: true
|
||||
user:
|
||||
daemon:
|
||||
exists: true
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
binaries:
|
||||
- apachectl
|
||||
- mariadb
|
||||
- php
|
||||
- render-template
|
||||
directories:
|
||||
- mode: "0775"
|
||||
paths:
|
||||
- /bitnami/phpmyadmin
|
||||
- /opt/bitnami/phpmyadmin
|
||||
- /opt/bitnami/phpmyadmin/tmp
|
||||
files:
|
||||
- paths:
|
||||
- /opt/bitnami/phpmyadmin/config.inc.php
|
||||
phpmodules:
|
||||
# Based on https://docs.phpmyadmin.net/en/latest/require.html#php
|
||||
# Required
|
||||
- mbstring
|
||||
- mysqli
|
||||
- openssl
|
||||
- xml
|
||||
- zip
|
||||
# Recommended
|
||||
- curl
|
||||
root_dir: /opt/bitnami
|
||||
|
|
@ -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": "phpmyadmin/goss/goss.yaml",
|
||||
"vars_file": "phpmyadmin/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-phpmyadmin"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"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": "phpmyadmin/goss/goss.yaml",
|
||||
"vars_file": "phpmyadmin/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-phpmyadmin"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "trivy",
|
||||
"params": {
|
||||
|
|
|
|||
Loading…
Reference in New Issue