[bitnami/airflow-scheduler] Add airflow-scheduler tests (#31098)

* [bitnami/airflow-scheduler] Add VIB tests

Signed-off-by: Michiel <michield@vmware.com>
This commit is contained in:
Michiel
2023-05-22 13:13:48 +02:00
committed by GitHub
parent b6de3a1d24
commit 418256a655
5 changed files with 98 additions and 2 deletions

View File

@@ -0,0 +1,18 @@
command:
check-airflow:
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-scheduler/goss/airflow-scheduler.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,34 @@
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/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": { "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": {
@@ -32,6 +33,21 @@
}, },
"verify": { "verify": {
"actions": [ "actions": [
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "airflow-scheduler/goss/goss.yaml",
"vars_file": "airflow-scheduler/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-airflow-scheduler"
}
}
}
},
{ {
"action_id": "trivy", "action_id": "trivy",
"params": { "params": {

View File

@@ -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": {
@@ -29,6 +30,21 @@
}, },
"verify": { "verify": {
"actions": [ "actions": [
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "airflow-scheduler/goss/goss.yaml",
"vars_file": "airflow-scheduler/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-airflow-scheduler"
}
}
}
},
{ {
"action_id": "trivy", "action_id": "trivy",
"params": { "params": {