[bitnami/superset] Add VIB tests (#67410)

* [bitnami/superset] Add VIB tests

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Remove extra files

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

---------

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>
Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>
This commit is contained in:
Miguel Ruiz 2025-01-23 12:31:30 +01:00 committed by GitHub
parent 3d83618cb8
commit 98fd2e7765
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 133 additions and 0 deletions

View File

@ -0,0 +1,14 @@
# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0
gossfile:
# Goss tests exclusive to the current container
../../superset/goss/superset.yaml: {}
# Load scripts from .vib/common/goss/templates
../../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,17 @@
# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0
command:
check-app-version:
exec: echo "SECRET_KEY='123456789abcdef'" > /tmp/superset_config.py && SUPERSET_CONFIG_PATH="/tmp/superset_config.py" superset version
exit-status: 0
stdout:
- "{{ .Env.APP_VERSION }}"
check-subpackages:
# Check python packages that should have been installed
exec: . /opt/bitnami/superset/venv/bin/activate && pip list
exit-status: 0
stdout:
{{ range $subpackage := .Vars.subpackages }}
- "{{ $subpackage }}"
{{ end }}

View File

@ -0,0 +1,27 @@
binaries:
- celery
- gunicorn
- superset
- python
- pip
linked_libraries:
exclude_paths:
# Ignore python venv executable scripts
- /opt/bitnami/superset/venv/.*
directories:
- mode: "0775"
paths:
- /opt/bitnami/superset
- /opt/bitnami/superset/superset_home
- /opt/bitnami/superset/logs
- /opt/bitnami/superset/tmp
root_dir: /opt/bitnami
subpackages:
- celery
- flower
- Flask
- gunicorn
- mysql
- mysqlclient
- psycopg2
- redis

View File

@ -0,0 +1,75 @@
{
"context": {
"resources": {
"url": "{SHA_ARCHIVE}",
"path": "{VIB_ENV_PATH}"
},
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
},
"phases": {
"package": {
"actions": [
{
"action_id": "container-image-package",
"params": {
"timeout_minutes": 60,
"application": {
"details": {
"name": "{VIB_ENV_CONTAINER}",
"tag": "{VIB_ENV_TAG}"
}
},
"architectures": [
"linux/amd64",
"linux/arm64"
],
"timeout_minutes": 50
}
},
{
"action_id": "container-image-lint",
"params": {
"threshold": "error"
}
}
]
},
"verify": {
"actions": [
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "superset/goss/goss.yaml",
"vars_file": "superset/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-superset"
}
}
}
},
{
"action_id": "trivy",
"params": {
"threshold": "LOW",
"vuln_type": [
"OS"
]
}
},
{
"action_id": "grype",
"params": {
"threshold": "CRITICAL",
"package_type": [
"OS"
]
}
}
]
}
}
}