[bitnami/*] Standarize initial testing suites (#27521)

* [bitnami/*] Standarize initial testing suites

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Fix typo

Signed-off-by: FraPazGal <fdepaz@vmware.com>

---------

Signed-off-by: FraPazGal <fdepaz@vmware.com>
This commit is contained in:
Francisco de Paz Galan
2023-03-21 09:23:40 +01:00
committed by GitHub
parent 3afea13e84
commit 9fe7ac0e1d
22 changed files with 47 additions and 31 deletions

View File

@@ -16,22 +16,22 @@ command:
{{ end }}
file:
# Main Apache config file includes other config files
{{ .Vars.root_dir }}/apache/conf/httpd.conf:
/opt/bitnami/apache/conf/httpd.conf:
exists: true
filetype: file
contains:
- /^Include.*{{ .Vars.root_dir }}/apache/conf/bitnami/bitnami.conf/
- /^Include.*{{ .Vars.root_dir }}/apache/conf/vhosts/\*.conf/
- /^Include.*{{ .Vars.root_dir }}/apache/conf/deflate.conf/
- /^Include.*/opt/bitnami/apache/conf/bitnami/bitnami.conf/
- /^Include.*/opt/bitnami/apache/conf/vhosts/\*.conf/
- /^Include.*/opt/bitnami/apache/conf/deflate.conf/
# Main Bitnami config file was correctly generated
{{ .Vars.root_dir }}/apache/conf/bitnami/bitnami.conf:
/opt/bitnami/apache/conf/bitnami/bitnami.conf:
exists: true
filetype: file
contains:
- /DocumentRoot.*{{ .Vars.root_dir }}/apache/htdocs/
- /^Include.*{{ .Vars.root_dir }}/apache/conf/bitnami/bitnami-ssl.conf/
- /DocumentRoot.*/opt/bitnami/apache/htdocs/
- /^Include.*/opt/bitnami/apache/conf/bitnami/bitnami-ssl.conf/
# Main Bitnami ssl config file was correctly generated
{{ .Vars.root_dir }}/apache/conf/bitnami/bitnami-ssl.conf:
/opt/bitnami/apache/conf/bitnami/bitnami-ssl.conf:
exists: true
filetype: file
contains:
@@ -39,11 +39,11 @@ file:
- /SSLCertificateFile.*bitnami/certs/server.crt/
- /SSLCertificateKeyFile.*bitnami/certs/server.key/
# CGI folder has been removed, as recommended by Apache
{{ .Vars.root_dir }}/apache/cgi-bin:
/opt/bitnami/apache/cgi-bin:
exists: false
# Compiled disabled modules should have been generated
{{ range $module := .Vars.modules.extra }}
{{ $.Vars.root_dir }}/apache/modules/mod_{{ $module }}.so:
/opt/bitnami/apache/modules/mod_{{ $module }}.so:
exists: true
filetype: file
{{ end }}

View File

@@ -10,3 +10,4 @@ gossfile:
../../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: {}

View File

@@ -1,6 +1,6 @@
command:
check-bin-caps:
exec: getcap {{ .Vars.root_dir }}/aspnet-core/bin/dotnet
exec: getcap /opt/bitnami/aspnet-core/bin/dotnet
stdout:
- {{ .Vars.binary.capabilities }}
exit-status: 0

View File

@@ -9,3 +9,4 @@ gossfile:
../../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: {}

View File

@@ -8,4 +8,5 @@ gossfile:
../../common/goss/templates/check-binaries.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-sed-in-place.yaml: {}
../../common/goss/templates/check-spdx.yaml: {}

View File

@@ -1,6 +1,6 @@
command:
check-bin-caps:
exec: getcap {{ .Vars.root_dir }}/dotnet-sdk/bin/dotnet
exec: getcap /opt/bitnami/dotnet-sdk/bin/dotnet
stdout:
- {{ .Vars.binary.capabilities }}
exit-status: 0

View File

@@ -9,3 +9,4 @@ gossfile:
../../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: {}

View File

@@ -1,6 +1,6 @@
command:
check-bin-caps:
exec: getcap {{ .Vars.root_dir }}/dotnet/bin/dotnet
exec: getcap /opt/bitnami/dotnet/bin/dotnet
stdout:
- {{ .Vars.binary.capabilities }}
exit-status: 0

View File

@@ -9,3 +9,4 @@ gossfile:
../../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: {}

View File

@@ -6,3 +6,4 @@ gossfile:
../../common/goss/templates/check-directories.yaml: {}
../../common/goss/templates/check-files.yaml: {}
../../common/goss/templates/check-linked-libraries.yaml: {}
../../common/goss/templates/check-spdx.yaml: {}

View File

@@ -7,3 +7,4 @@ gossfile:
../../common/goss/templates/check-ca-certs.yaml: {}
../../common/goss/templates/check-linked-libraries.yaml: {}
../../common/goss/templates/check-sed-in-place.yaml: {}
../../common/goss/templates/check-spdx.yaml: {}

View File

@@ -7,3 +7,4 @@ gossfile:
../../common/goss/templates/check-ca-certs.yaml: {}
../../common/goss/templates/check-linked-libraries.yaml: {}
../../common/goss/templates/check-sed-in-place.yaml: {}
../../common/goss/templates/check-spdx.yaml: {}

View File

@@ -7,3 +7,4 @@ gossfile:
../../common/goss/templates/check-ca-certs.yaml: {}
../../common/goss/templates/check-files.yaml: {}
../../common/goss/templates/check-sed-in-place.yaml: {}
../../common/goss/templates/check-spdx.yaml: {}

View File

@@ -7,3 +7,4 @@ gossfile:
../../common/goss/templates/check-ca-certs.yaml: {}
../../common/goss/templates/check-linked-libraries.yaml: {}
../../common/goss/templates/check-sed-in-place.yaml: {}
../../common/goss/templates/check-spdx.yaml: {}

View File

@@ -9,3 +9,4 @@ gossfile:
../../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: {}

View File

@@ -1,16 +1,16 @@
file:
# Checks there is a template already loaded as a config file
{{ .Vars.root_dir }}/mariadb/conf/my.cnf:
/opt/bitnami/mariadb/conf/my.cnf:
exists: true
filetype: file
contains:
- socket={{ .Vars.root_dir }}/mariadb/tmp/mysql.sock
- socket=/opt/bitnami/mariadb/tmp/mysql.sock
# Checks the postunpack phase properly creates the plugin's symlink
{{ .Vars.root_dir }}/mariadb/lib/plugin:
/opt/bitnami/mariadb/lib/plugin:
exists: true
filetype: symlink
# Check the plugins added at compilation time are available
{{ .Vars.root_dir }}/mariadb/plugin/auth_pam.so:
/opt/bitnami/mariadb/plugin/auth_pam.so:
exists: true
filetype: file
mode: "0644"

View File

@@ -8,4 +8,5 @@ gossfile:
../../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-sed-in-place.yaml: {}
../../common/goss/templates/check-spdx.yaml: {}

View File

@@ -8,3 +8,4 @@ gossfile:
../../common/goss/templates/check-ca-certs.yaml: {}
../../common/goss/templates/check-linked-libraries.yaml: {}
../../common/goss/templates/check-sed-in-place.yaml: {}
../../common/goss/templates/check-spdx.yaml: {}

View File

@@ -7,4 +7,5 @@ gossfile:
../../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-sed-in-place.yaml: {}
../../common/goss/templates/check-spdx.yaml: {}

View File

@@ -5,6 +5,7 @@ binaries:
- python
- rails
- ruby
- wait-for-port
directories:
- mode: "0775"
paths:
@@ -16,4 +17,4 @@ version:
modules:
- sqlite3
- mysql
- pg
- pg

View File

@@ -9,3 +9,4 @@ gossfile:
../../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: {}

View File

@@ -1,6 +1,6 @@
command:
check-app-version:
exec: cat {{ .Vars.root_dir }}/wordpress/wp-includes/version.php | grep "wp_version"
exec: cat /opt/bitnami/wordpress/wp-includes/version.php | grep "wp_version"
exit-status: 0
stdout:
- {{ .Env.APP_VERSION }}
@@ -9,9 +9,9 @@ command:
exec: wp --info
exit-status: 0
stdout:
- "{{ .Vars.root_dir }}/php/bin/php"
- "{{ .Vars.root_dir }}/mysql/bin/mysql"
- "{{ .Vars.root_dir }}/wp-cli/conf/wp-cli.yml"
- "/opt/bitnami/php/bin/php"
- "/opt/bitnami/mysql/bin/mysql"
- "/opt/bitnami/wp-cli/conf/wp-cli.yml"
check-enabled-modules:
exec: php -m
exit-status: 0
@@ -21,26 +21,26 @@ command:
{{ end }}
file:
# HTTP vhost should have been properly rendered
{{ .Vars.root_dir }}/apache/conf/vhosts/wordpress-vhost.conf:
/opt/bitnami/apache/conf/vhosts/wordpress-vhost.conf:
exists: true
filetype: file
contains:
- "RewriteRule ^bitnami/wordpress(/.*) $1"
- /DocumentRoot.*{{ .Vars.root_dir }}/wordpress/
- /DocumentRoot.*/opt/bitnami/wordpress/
# HTTPs vhost should have been properly rendered
{{ .Vars.root_dir }}/apache/conf/vhosts/wordpress-https-vhost.conf:
/opt/bitnami/apache/conf/vhosts/wordpress-https-vhost.conf:
exists: true
filetype: file
contains:
- "SSLEngine on"
- "RewriteRule ^bitnami/wordpress(/.*) $1"
- /DocumentRoot.*{{ .Vars.root_dir }}/wordpress/
- /DocumentRoot.*/opt/bitnami/wordpress/
# WP-CLI should point to wordpress' installation path
{{ .Vars.root_dir }}/wp-cli/conf/wp-cli.yml:
/opt/bitnami/wp-cli/conf/wp-cli.yml:
exists: true
filetype: file
contains:
- /path.*{{ .Vars.root_dir }}/wordpress/
- /path.*/opt/bitnami/wordpress/
group:
daemon:
exists: true