mirror of
https://github.com/bitnami/containers.git
synced 2026-03-16 06:49:12 +08:00
[bitnami/magento] Add VIB tests (#32689)
* [bitnami/magento] Add initial tests Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/magento] Fix binary names and add version test Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/magento] Add change in docker-compose file to trigger tests Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/magento] Fix htaccess check test, add apache-libphp template and check app modules Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/magento] Delete double check binary Signed-off-by: Cori Avila <42420333+corico44@users.noreply.github.com> * [bitnami/magento] Delete sed check test Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/magento] Use owner and group from directories template Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/magento] Add excluded paths in sed test Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/magento] Add sed test Signed-off-by: Cori Avila <42420333+corico44@users.noreply.github.com> * [bitnami/magento] Add check for vhost file and delete some text check in file Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/magento] Delete trigger in docker-compose file Signed-off-by: Cori Avila <42420333+corico44@users.noreply.github.com> --------- Signed-off-by: Cori Avila <amisericordi@vmware.com> Signed-off-by: Cori Avila <42420333+corico44@users.noreply.github.com>
This commit is contained in:
12
.vib/magento/goss/goss.yaml
Normal file
12
.vib/magento/goss/goss.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
gossfile:
|
||||
# Goss tests exclusive to the current container
|
||||
../../magento/goss/magento.yaml: {}
|
||||
# Load scripts from .vib/common/goss/templates
|
||||
../../common/goss/templates/check-apache-libphp.yaml: {}
|
||||
../../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-sed-in-place.yaml: {}
|
||||
../../common/goss/templates/check-spdx.yaml: {}
|
||||
27
.vib/magento/goss/magento.yaml
Normal file
27
.vib/magento/goss/magento.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
group:
|
||||
daemon:
|
||||
exists: true
|
||||
user:
|
||||
daemon:
|
||||
exists: true
|
||||
file:
|
||||
# HTTPs vhost should have been properly rendered
|
||||
/opt/bitnami/apache/conf/vhosts/magento-https-vhost.conf:
|
||||
exists: true
|
||||
filetype: file
|
||||
contains:
|
||||
- "SSLEngine on"
|
||||
- /DocumentRoot.*/opt/bitnami/magento/
|
||||
/opt/bitnami/apache/conf/vhosts/htaccess/magento-htaccess.conf:
|
||||
exists: false
|
||||
/opt/bitnami/php/etc/php.ini:
|
||||
exists: true
|
||||
filetype: file
|
||||
contains:
|
||||
- "opcache.consistency_checks = 0"
|
||||
- "opcache.validate_timestamps = 0"
|
||||
- "opcache.enable_cli = 1"
|
||||
command:
|
||||
check-app-modules:
|
||||
exec: magento module:enable Magento_Store
|
||||
exit-status: 0
|
||||
25
.vib/magento/goss/vars.yaml
Normal file
25
.vib/magento/goss/vars.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
binaries:
|
||||
- apachectl
|
||||
- php
|
||||
- magento
|
||||
- mysql
|
||||
- render-template
|
||||
- wait-for-port
|
||||
- composer
|
||||
directories:
|
||||
- mode: "0775"
|
||||
owner: daemon
|
||||
group: root
|
||||
paths:
|
||||
- /opt/bitnami/magento
|
||||
- /bitnami/magento
|
||||
- /opt/bitnami/magento/tmp
|
||||
- /opt/bitnami/magento/uploads
|
||||
version:
|
||||
bin_name: magento
|
||||
flag: --version
|
||||
root_dir: /opt/bitnami
|
||||
sed_in_place:
|
||||
exclude_paths:
|
||||
- /opt/bitnami/magento/vendor/laminas/laminas-http/.laminas-ci/pre-run.sh
|
||||
- /opt/bitnami/magento/vendor/phpseclib/mcrypt_compat/travis/run-phpunit.sh
|
||||
@@ -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": "magento/goss/goss.yaml",
|
||||
"vars_file": "magento/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-magento"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"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": "magento/goss/goss.yaml",
|
||||
"vars_file": "magento/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-magento"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "trivy",
|
||||
"params": {
|
||||
|
||||
Reference in New Issue
Block a user