[bitnami/dokuwiki] Add VIB tests (#30859)

* [bitnami/dokuwiki] Add VIB tests

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Add trigger

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Apply suggestions

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Apply changes to https-vhost and remove trigger

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

---------

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>
This commit is contained in:
Miguel Ruiz
2023-05-12 16:30:25 +02:00
committed by GitHub
parent f70473acec
commit 22c26f3dc7
5 changed files with 92 additions and 5 deletions
+29
View File
@@ -0,0 +1,29 @@
file:
/opt/bitnami/apache/conf/vhosts/dokuwiki-vhost.conf:
exists: true
filetype: file
contains:
- /DocumentRoot.*/opt/bitnami/dokuwiki/
- "RewriteEngine on"
- "RewriteCond %{REQUEST_URI} !^/server-status$"
- "RewriteRule ^index.php$ doku.php"
/opt/bitnami/apache/conf/vhosts/dokuwiki-https-vhost.conf:
exists: true
filetype: file
contains:
- "SSLEngine on"
- /DocumentRoot.*/opt/bitnami/dokuwiki/
- "RewriteEngine on"
- "RewriteCond %{REQUEST_URI} !^/server-status$"
- "RewriteRule ^index.php$ doku.php"
/opt/bitnami/php/etc/php.ini:
exists: true
filetype: file
contains:
- /^memory_limit = 256M/
group:
daemon:
exists: true
user:
daemon:
exists: true
+11
View File
@@ -0,0 +1,11 @@
gossfile:
# Goss tests exclusive to the current container
../../dokuwiki/goss/dokuwiki.yaml: {}
# Load scripts from .vib/common/goss/templates
../../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: {}
+15
View File
@@ -0,0 +1,15 @@
binaries:
- php
- apachectl
- render-template
directories:
- mode: "0775"
paths:
- /bitnami/dokuwiki
- /opt/bitnami/dokuwiki
- /opt/bitnami/dokuwiki/lib/images/smileys/local
- /opt/bitnami/dokuwiki/uploads
root_dir: /opt/bitnami
sed_in_place:
exclude_paths:
- /opt/bitnami/dokuwiki/lib/scripts/
+20 -4
View File
@@ -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": "dokuwiki/goss/goss.yaml",
"vars_file": "dokuwiki/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-dokuwiki"
}
}
}
},
{
"action_id": "trivy",
"params": {
@@ -77,9 +93,9 @@
"url": "{VIB_ENV_PACKAGES_JSON_URL}",
"path": "/{VIB_ENV_PATH}",
"authn": {
"header": "Authorization",
"token": "Bearer {VIB_ENV_GITHUB_TOKEN}"
}
"header": "Authorization",
"token": "Bearer {VIB_ENV_GITHUB_TOKEN}"
}
}
}
}
+17 -1
View File
@@ -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": "dokuwiki/goss/goss.yaml",
"vars_file": "dokuwiki/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-dokuwiki"
}
}
}
},
{
"action_id": "trivy",
"params": {