[bitnami/mastodon] Add VIB tests (#34942)

* [bitmami/mastodon] Add initial tests

Signed-off-by: Cori Avila <amisericordi@vmware.com>

* [bitmami/mastodon] Fix binaries check

Signed-off-by: Cori Avila <amisericordi@vmware.com>

* [bitmami/mastodon] Fix content of file check

Signed-off-by: Cori Avila <amisericordi@vmware.com>

* [bitmami/mastodon] Add change in docker-compose file to trigger tests

Signed-off-by: Cori Avila <amisericordi@vmware.com>

* [bitnami/mastodon] Add missing binary and add group for directories check

Signed-off-by: Cori Avila <amisericordi@vmware.com>

* [bitnami/mastodon] Delete trigger in docker-compose file

Signed-off-by: Cori Avila <42420333+corico44@users.noreply.github.com>

---------

Signed-off-by: Cori Avila <amisericordi@vmware.com>
Signed-off-by: Cori Avila <42420333+corico44@users.noreply.github.com>
This commit is contained in:
Cori Avila
2023-05-25 10:16:03 +02:00
committed by GitHub
parent e545a60ee2
commit 62c90fac16
5 changed files with 85 additions and 2 deletions
+11
View File
@@ -0,0 +1,11 @@
gossfile:
# Goss tests exclusive to the current container
../../mastodon/goss/mastodon.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: {}
+22
View File
@@ -0,0 +1,22 @@
group:
mastodon:
exists: true
user:
mastodon:
exists: true
file:
/opt/bitnami/mastodon/config/initializers/1_hosts.rb:
exists: true
filetype: file
contains:
- "https = ENV['MASTODON_HTTPS_ENABLED'] == 'true'"
- "config.hosts.clear if ENV['MASTODON_ALLOW_ALL_DOMAINS'] == 'true'"
/opt/bitnami/mastodon/config/environments/production.rb:
exists: true
filetype: file
contains:
- "config.force_ssl = ENV['MASTODON_HTTPS_ENABLED'] == 'true'"
/opt/mastodon:
exists: true
filetype: symlink
linked-to: /opt/bitnami/mastodon
+18
View File
@@ -0,0 +1,18 @@
binaries:
- node
- psql
- python
- redis-cli
- ruby
- wait-for-port
- tootctl
directories:
- mode: "0775"
group: root
paths:
- /bitnami/mastodon
- /opt/bitnami/mastodon/tmp
- /opt/bitnami/mastodon/public
- /opt/bitnami/mastodon/public/system
- /opt/bitnami/mastodon/public/assets
root_dir: /opt/bitnami
+17 -1
View File
@@ -3,7 +3,8 @@
"resources": {
"url": "{VIB_ENV_CONTAINER_URL}",
"path": "{VIB_ENV_PATH}"
}
},
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
},
"phases": {
"package": {
@@ -29,6 +30,21 @@
},
"verify": {
"actions": [
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "mastodon/goss/goss.yaml",
"vars_file": "mastodon/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-mastodon"
}
}
}
},
{
"action_id": "trivy",
"params": {
+17 -1
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": "mastodon/goss/goss.yaml",
"vars_file": "mastodon/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-mastodon"
}
}
}
},
{
"action_id": "trivy",
"params": {