mirror of
https://github.com/bitnami/containers.git
synced 2026-03-14 06:48:11 +08:00
[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:
committed by
GitHub
parent
881235f82c
commit
57992e35d1
13
.vib/php-fpm/goss/goss.yaml
Normal file
13
.vib/php-fpm/goss/goss.yaml
Normal file
@@ -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: {}
|
||||||
49
.vib/php-fpm/goss/php-fpm.yaml
Normal file
49
.vib/php-fpm/goss/php-fpm.yaml
Normal file
@@ -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 }}
|
||||||
58
.vib/php-fpm/goss/vars.yaml
Normal file
58
.vib/php-fpm/goss/vars.yaml
Normal file
@@ -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": {
|
"resources": {
|
||||||
"url": "{VIB_ENV_CONTAINER_URL}",
|
"url": "{VIB_ENV_CONTAINER_URL}",
|
||||||
"path": "{VIB_ENV_PATH}"
|
"path": "{VIB_ENV_PATH}"
|
||||||
}
|
},
|
||||||
|
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
|
||||||
},
|
},
|
||||||
"phases": {
|
"phases": {
|
||||||
"package": {
|
"package": {
|
||||||
@@ -76,9 +77,24 @@
|
|||||||
"url": "{VIB_ENV_PACKAGES_JSON_URL}",
|
"url": "{VIB_ENV_PACKAGES_JSON_URL}",
|
||||||
"path": "/{VIB_ENV_PATH}",
|
"path": "/{VIB_ENV_PATH}",
|
||||||
"authn": {
|
"authn": {
|
||||||
"header": "Authorization",
|
"header": "Authorization",
|
||||||
"token": "Bearer {VIB_ENV_GITHUB_TOKEN}"
|
"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": {
|
"resources": {
|
||||||
"url": "{SHA_ARCHIVE}",
|
"url": "{SHA_ARCHIVE}",
|
||||||
"path": "{VIB_ENV_PATH}"
|
"path": "{VIB_ENV_PATH}"
|
||||||
}
|
},
|
||||||
|
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
|
||||||
},
|
},
|
||||||
"phases": {
|
"phases": {
|
||||||
"package": {
|
"package": {
|
||||||
@@ -46,6 +47,21 @@
|
|||||||
"OS"
|
"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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user