mirror of
https://github.com/bitnami/containers.git
synced 2026-10-21 18:14:01 +02:00
[bitnami/prestashop] Add VIB tests (#33604)
Signed-off-by: Marcos Bjoerkelund <marcosbd@vmware.com>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
gossfile:
|
||||
# Goss tests exclusive to the current container
|
||||
../../prestashop/goss/prestashop.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,45 @@
|
||||
command:
|
||||
check-app-version:
|
||||
exec: grep -Eo "'_PS_INSTALL_VERSION_', '[^']*'" /opt/bitnami/prestashop/install/install_version.php
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- {{ .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 = 128M
|
||||
- upload_max_filesize = 128M
|
||||
# Ensure that .htaccess file contents have not been moved to /opt/bitnami/apache/conf/vhosts/htaccess
|
||||
/opt/bitnami/prestashop/app/.htaccess:
|
||||
exists: true
|
||||
filetype: file
|
||||
contains:
|
||||
- Require all denied
|
||||
# HTTP vhost should have been properly rendered
|
||||
/opt/bitnami/apache/conf/vhosts/prestashop-vhost.conf:
|
||||
exists: true
|
||||
filetype: file
|
||||
contains:
|
||||
- /DocumentRoot.*/opt/bitnami/prestashop/
|
||||
# HTTPS vhost should have been properly rendered
|
||||
/opt/bitnami/apache/conf/vhosts/prestashop-https-vhost.conf:
|
||||
exists: true
|
||||
filetype: file
|
||||
contains:
|
||||
- "SSLEngine on"
|
||||
- /DocumentRoot.*/opt/bitnami/prestashop/
|
||||
group:
|
||||
daemon:
|
||||
exists: true
|
||||
user:
|
||||
daemon:
|
||||
exists: true
|
||||
@@ -0,0 +1,35 @@
|
||||
binaries:
|
||||
- apachectl
|
||||
- mariadb
|
||||
- php
|
||||
- render-template
|
||||
directories:
|
||||
- mode: "0775"
|
||||
paths:
|
||||
- /bitnami/prestashop
|
||||
- /opt/bitnami/prestashop
|
||||
- /opt/bitnami/prestashop/admin
|
||||
- /opt/bitnami/prestashop/install
|
||||
files:
|
||||
- paths:
|
||||
- /opt/bitnami/prestashop/install/index_cli.php
|
||||
phpmodules:
|
||||
# Based on https://github.com/PrestaShop/php-ps-info
|
||||
# Required
|
||||
- curl
|
||||
- dom
|
||||
- fileinfo
|
||||
- gd
|
||||
- iconv
|
||||
- intl
|
||||
- json
|
||||
- mbstring
|
||||
- openssl
|
||||
- pdo_mysql
|
||||
- SimpleXML
|
||||
- zip
|
||||
# Recommended
|
||||
- bcmath
|
||||
- imagick
|
||||
- memcached
|
||||
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": "prestashop/goss/goss.yaml",
|
||||
"vars_file": "prestashop/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-prestashop"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"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": "prestashop/goss/goss.yaml",
|
||||
"vars_file": "prestashop/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-prestashop"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "trivy",
|
||||
"params": {
|
||||
|
||||
Reference in New Issue
Block a user