[bitnami/python] Add VIB tests (#25808)

* [bitnami/python] Add VIB tests

Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com>

* Remove VIB trigger

Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com>

---------

Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com>
This commit is contained in:
Jose Antonio Carmona
2023-03-03 16:19:48 +01:00
committed by GitHub
parent 580c67f8a0
commit fad59c0cb9
5 changed files with 64 additions and 2 deletions

View File

@@ -0,0 +1,10 @@
gossfile:
# Goss tests exclusive to the current container
../../python/goss/python.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-linked-libraries.yaml: {}
../../common/goss/templates/check-sed-in-place.yaml: {}

View File

@@ -0,0 +1,14 @@
command:
check-basic-command:
exec: python -c "import datetime; print(datetime.datetime.now().year)" | grep $(date +"%Y")
exit-status: 0
check-pip:
exec: pip install docutils
exit-status: 0
check-venv:
exec: virtualenv /tmp/vib-venv
exit-status: 0
# Shared module is expected as per compilation flags
check-shared-module:
exec: find /opt/bitnami/python/lib/libpython{{ regexFind "\\d+\\.\\d+" .Env.APP_VERSION }}*so -type l
exit-status: 0

View File

@@ -0,0 +1,6 @@
binaries:
- python
version:
bin_name: python
flag: --version
root_dir: /opt/bitnami