[bitnami/drupal-nginx] Add VIB tests (#29190)
* [bitnami/drupal-nginx] Add VIB tests Signed-off-by: Miguel Ruiz <miruiz@vmware.com> * Add VIB trigger Signed-off-by: Miguel Ruiz <miruiz@vmware.com> * Add suggested changes and missing tests Signed-off-by: Miguel Ruiz <miruiz@vmware.com> * Apply suggestions from #29156 Signed-off-by: Miguel Ruiz <miruiz@vmware.com> * Remove check-files common test Signed-off-by: Miguel Ruiz <miruiz@vmware.com> * Apply suggestions Signed-off-by: Miguel Ruiz <miruiz@vmware.com> * Add common libs tests Signed-off-by: Miguel Ruiz <miruiz@vmware.com> * Remove triggers Signed-off-by: Miguel Ruiz <miruiz@vmware.com> --------- Signed-off-by: Miguel Ruiz <miruiz@vmware.com>
This commit is contained in:
parent
929eb04b87
commit
d06a524d04
|
|
@ -0,0 +1,30 @@
|
|||
file:
|
||||
# HTTP server block should have been properly rendered
|
||||
/opt/bitnami/nginx/conf/server_blocks/drupal-server-block.conf:
|
||||
exists: true
|
||||
filetype: file
|
||||
contains:
|
||||
- /root\s+/opt/bitnami/drupal/
|
||||
# HTTPs server block should have been properly rendered
|
||||
/opt/bitnami/nginx/conf/server_blocks/drupal-https-server-block.conf:
|
||||
exists: true
|
||||
filetype: file
|
||||
contains:
|
||||
- /listen \d+ ssl/
|
||||
- /root\s+/opt/bitnami/drupal/
|
||||
/opt/bitnami/drupal/sites/default/settings.php:
|
||||
exists: true
|
||||
filetype: file
|
||||
contains:
|
||||
- "$settings['trusted_host_patterns'] = array('^.*$');"
|
||||
/opt/bitnami/php/etc/php.ini:
|
||||
exists: true
|
||||
filetype: file
|
||||
contains:
|
||||
- /^memory_limit = 256M/
|
||||
/opt/bitnami/nginx/conf/bitnami/php-fpm.conf:
|
||||
exists: true
|
||||
filetype: file
|
||||
contains:
|
||||
- "location ~ \\.php$|^/update.php {"
|
||||
- "fastcgi_split_path_info ^(.+?.php)(|/.*)$;"
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
gossfile:
|
||||
# Goss tests exclusive to the current container
|
||||
../../drupal-nginx/goss/drupal-nginx.yaml: {}
|
||||
# Load scripts from .vib/common/goss/templates
|
||||
../../common/goss/templates/check-app-version.yaml: {}
|
||||
../../common/goss/templates/check-php-fpm.yaml: {}
|
||||
../../common/goss/templates/check-nginx-php-fpm.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: {}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
binaries:
|
||||
- nginx
|
||||
- mysql
|
||||
- php
|
||||
- render-template
|
||||
- drush
|
||||
directories:
|
||||
- mode: "0775"
|
||||
paths:
|
||||
- /bitnami/drupal
|
||||
- /opt/bitnami/drupal
|
||||
- /opt/bitnami/drupal/sites/default/files
|
||||
- /.drush
|
||||
- paths:
|
||||
- /opt/bitnami/drupal/themes
|
||||
- /opt/bitnami/drupal/modules
|
||||
root_dir: /opt/bitnami
|
||||
version:
|
||||
bin_name: drush
|
||||
flag: status
|
||||
|
|
@ -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": "drupal-nginx/goss/goss.yaml",
|
||||
"vars_file": "drupal-nginx/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-drupal-nginx"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"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": "drupal-nginx/goss/goss.yaml",
|
||||
"vars_file": "drupal-nginx/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-drupal-nginx"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "trivy",
|
||||
"params": {
|
||||
|
|
|
|||
Loading…
Reference in New Issue