[bitnami/cassandra-exporter] Add VIB tests (#30034)

* [bitnami/cassandra-exporter] Add VIB tests

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

* Add triggers

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

* Add --preserve-status and increase timeout

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

* Fix exit-status

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

* Fix exit-status

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

* Remove trigger

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

---------

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>
This commit is contained in:
Miguel Ruiz
2023-04-13 13:34:31 +02:00
committed by GitHub
parent 5c4f3881d4
commit e614d368ed
5 changed files with 58 additions and 5 deletions

View File

@@ -0,0 +1,8 @@
command:
check-cassandra-exporter-jar:
exec: timeout --preserve-status 5 java -jar /opt/bitnami/cassandra-exporter/cassandra_exporter.jar /opt/bitnami/cassandra-exporter/config.yml
exit-status: 143
timeout: 8000
stderr:
- Loading yaml config
- Connection refused to host

View File

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

View File

@@ -0,0 +1,3 @@
binaries:
- java
root_dir: /opt/bitnami

View File

@@ -3,7 +3,8 @@
"resources": {
"url": "{VIB_ENV_CONTAINER_URL}",
"path": "{VIB_ENV_PATH}"
}
},
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
},
"phases": {
"package": {
@@ -33,6 +34,21 @@
},
"verify": {
"actions": [
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "cassandra-exporter/goss/goss.yaml",
"vars_file": "cassandra-exporter/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-cassandra-exporter"
}
}
}
},
{
"action_id": "trivy",
"params": {
@@ -77,9 +93,9 @@
"url": "{VIB_ENV_PACKAGES_JSON_URL}",
"path": "/{VIB_ENV_PATH}",
"authn": {
"header": "Authorization",
"token": "Bearer {VIB_ENV_GITHUB_TOKEN}"
}
"header": "Authorization",
"token": "Bearer {VIB_ENV_GITHUB_TOKEN}"
}
}
}
}

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