[bitnami/airflow] Add VIB tests (#30860)

* [bitnami/airflow] Add VIB tests

Signed-off-by: Michiel <michield@vmware.com>
This commit is contained in:
Michiel
2023-05-18 09:43:49 +02:00
committed by GitHub
parent e48696b784
commit 7ec6216a85
5 changed files with 99 additions and 2 deletions

View File

@@ -0,0 +1,18 @@
command:
check-scheduler:
timeout: 30000
exec: airflow users list
exit-status: 0
stdout:
- No data found
check-subpackages:
# Check python packages that should have been installed
exec: . /opt/bitnami/airflow/venv/bin/activate && pip list
exit-status: 0
stdout:
{{ range $subpackage := .Vars.subpackages }}
- {{ $subpackage }}
{{ end }}
file:
/opt/bitnami/airflow/venv/lib/python3.9/site-packages/airflow/www/node_modules:
exists: false

View File

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

View File

@@ -0,0 +1,35 @@
binaries:
- airflow
- ini-file
- psql
- python
- wait-for-port
linked_libraries:
exclude_paths:
# Ignore python venv executable scripts
- /opt/bitnami/airflow/venv/.*
directories:
- mode: "0775"
paths:
- /opt/bitnami/airflow
- /opt/bitnami/airflow/dags
- /opt/bitnami/airflow/logs
- /opt/bitnami/airflow/logs/scheduler
- /opt/bitnami/airflow/tmp
root_dir: /opt/bitnami
version:
bin_name: airflow
flag: version
subpackages:
- async
- amazon
- celery
- /cncf.kubernetes/
- docker
- hashicorp
- ldap
- google
- /microsoft.azure/
- mysql
- postgres
- redis

View File

@@ -3,7 +3,8 @@
"resources": {
"url": "{VIB_ENV_CONTAINER_URL}",
"path": "{VIB_ENV_PATH}"
}
},
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
},
"phases": {
"package": {
@@ -32,6 +33,21 @@
},
"verify": {
"actions": [
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "airflow/goss/goss.yaml",
"vars_file": "airflow/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-airflow"
}
}
}
},
{
"action_id": "trivy",
"params": {

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": "airflow/goss/goss.yaml",
"vars_file": "airflow/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-airflow"
}
}
}
},
{
"action_id": "trivy",
"params": {