[bitnami/php-fpm] Add VIB tests (#28196)
* [bitnami/php-fpm] Add VIB tests Signed-off-by: FraPazGal <fdepaz@vmware.com> * Trigger VIB Signed-off-by: FraPazGal <fdepaz@vmware.com> * Remove VIB trigger Signed-off-by: FraPazGal <fdepaz@vmware.com> * Apply suggestions and trigger CI Signed-off-by: FraPazGal <fdepaz@vmware.com> * Remove VIB trigger Signed-off-by: FraPazGal <fdepaz@vmware.com> * Add missing binary checks Signed-off-by: FraPazGal <fdepaz@vmware.com> * Remove inactive modules check Signed-off-by: FraPazGal <fdepaz@vmware.com> --------- Signed-off-by: FraPazGal <fdepaz@vmware.com>
This commit is contained in:
parent
881235f82c
commit
57992e35d1
|
|
@ -0,0 +1,13 @@
|
|||
gossfile:
|
||||
# Goss tests exclusive to the current container
|
||||
../../php-fpm/goss/php-fpm.yaml: {}
|
||||
# Load scripts from .vib/common/goss/templates
|
||||
../../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-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,49 @@
|
|||
file:
|
||||
/opt/bitnami/php/lib/php.ini:
|
||||
exists: true
|
||||
filetype: symlink
|
||||
linked-to: ../etc/php.ini
|
||||
# Checks custom config
|
||||
/opt/bitnami/php/etc/php.ini:
|
||||
exists: true
|
||||
filetype: file
|
||||
contains:
|
||||
- upload_max_filesize = 40M
|
||||
- opcache.revalidate_freq = 60
|
||||
/opt/bitnami/php/etc/common.conf:
|
||||
exists: true
|
||||
filetype: file
|
||||
contains:
|
||||
- user=daemon
|
||||
/opt/bitnami/php/etc/php-fpm.conf:
|
||||
exists: true
|
||||
filetype: file
|
||||
contains:
|
||||
- error_log = /opt/bitnami/php/logs/php-fpm.log
|
||||
/opt/bitnami/php/etc/php-fpm.d/www.conf:
|
||||
exists: true
|
||||
filetype: file
|
||||
contains:
|
||||
- listen = 9000
|
||||
- include=/opt/bitnami/php/etc/environment.conf
|
||||
- include=/opt/bitnami/php/etc/common.conf
|
||||
command:
|
||||
check-used-config:
|
||||
exec: php --ini
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- /opt/bitnami/php/lib/php.ini
|
||||
- /opt/bitnami/php/etc/conf.d
|
||||
check-config-syntax:
|
||||
exec: php -l /opt/bitnami/php/etc/php-fpm.conf
|
||||
exit-status: 0
|
||||
check-enabled-modules:
|
||||
exec: php -i
|
||||
exit-status: 0
|
||||
stdout:
|
||||
{{ range $module := .Vars.modules.enabled }}
|
||||
- /{{ $module }}.*enabled/
|
||||
{{ end }}
|
||||
{{ range $module := .Vars.modules.disabled }}
|
||||
- "!{{ $module }}"
|
||||
{{ end }}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
binaries:
|
||||
- composer
|
||||
- pear
|
||||
- pecl
|
||||
- php
|
||||
directories:
|
||||
- paths:
|
||||
- /opt/bitnami/php/etc/conf.d
|
||||
- /opt/bitnami/php/logs
|
||||
files:
|
||||
- paths:
|
||||
- /opt/bitnami/php/etc/php.ini-production
|
||||
- /opt/bitnami/php/etc/php.ini-development
|
||||
- /opt/bitnami/php/etc/environment.conf
|
||||
- /opt/bitnami/php/etc/common.conf
|
||||
- /opt/bitnami/php/etc/pear.conf
|
||||
modules:
|
||||
enabled:
|
||||
- ZLib
|
||||
- libXML
|
||||
- Soap
|
||||
- bzip2
|
||||
- Sockets
|
||||
- pcntl
|
||||
- EXIF
|
||||
- BCMath
|
||||
- PDO.*MySQL
|
||||
- MysqlI
|
||||
- OpenSSL
|
||||
- FTP
|
||||
- Calendar
|
||||
- GetText
|
||||
- DOM/XML
|
||||
- XSL
|
||||
- mbstring
|
||||
- ctype
|
||||
- Session
|
||||
- mysqlnd
|
||||
- Internationalization
|
||||
- iconv
|
||||
- PDO.*SQLite
|
||||
- SQLite3
|
||||
- Readline
|
||||
- gmp
|
||||
- cURL
|
||||
- PDO
|
||||
- SimpleXML
|
||||
- sodium
|
||||
- GD
|
||||
- FreeType
|
||||
- JPEG
|
||||
- WebP
|
||||
disabled:
|
||||
- rpath
|
||||
root_dir: /opt/bitnami
|
||||
version:
|
||||
bin_name: php
|
||||
flag: -v
|
||||
|
|
@ -3,7 +3,8 @@
|
|||
"resources": {
|
||||
"url": "{VIB_ENV_CONTAINER_URL}",
|
||||
"path": "{VIB_ENV_PATH}"
|
||||
}
|
||||
},
|
||||
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
|
||||
},
|
||||
"phases": {
|
||||
"package": {
|
||||
|
|
@ -76,9 +77,24 @@
|
|||
"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}"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "goss",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib"
|
||||
},
|
||||
"tests_file": "php-fpm/goss/goss.yaml",
|
||||
"vars_file": "php-fpm/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-php-fpm"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
"resources": {
|
||||
"url": "{SHA_ARCHIVE}",
|
||||
"path": "{VIB_ENV_PATH}"
|
||||
}
|
||||
},
|
||||
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
|
||||
},
|
||||
"phases": {
|
||||
"package": {
|
||||
|
|
@ -46,6 +47,21 @@
|
|||
"OS"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "goss",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib"
|
||||
},
|
||||
"tests_file": "php-fpm/goss/goss.yaml",
|
||||
"vars_file": "php-fpm/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-php-fpm"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue