mirror of
https://github.com/bitnami/containers.git
synced 2026-02-18 03:57:16 +08:00
[bitnami/supabase-postgres] Add VIB tests (#34143)
Signed-off-by: Andrés Bono <andresbono@vmware.com>
This commit is contained in:
12
.vib/supabase-postgres/goss/goss.yaml
Normal file
12
.vib/supabase-postgres/goss/goss.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
gossfile:
|
||||
# Goss tests exclusive to the current container
|
||||
../../supabase-postgres/goss/supabase-postgres.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-files.yaml: {}
|
||||
../../common/goss/templates/check-linked-libraries.yaml: {}
|
||||
../../common/goss/templates/check-sed-in-place.yaml: {}
|
||||
../../common/goss/templates/check-spdx.yaml: {}
|
||||
15
.vib/supabase-postgres/goss/supabase-postgres.yaml
Normal file
15
.vib/supabase-postgres/goss/supabase-postgres.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
command:
|
||||
# PostgreSQL should match the major version
|
||||
check-postgresql-version:
|
||||
exec: {{ .Vars.version.bin_name }} {{ .Vars.version.flag }} | grep "$(echo $APP_VERSION | sed -E 's|^([0-9]+\.).+$| \1|g')"
|
||||
exit-status: 0
|
||||
file:
|
||||
/opt/bitnami/postgresql/logs/postgresql.log:
|
||||
exists: true
|
||||
filetype: symlink
|
||||
linked-to: /dev/stdout
|
||||
/opt/bitnami/postgresql/conf/postgresql.conf:
|
||||
exists: true
|
||||
mode: "0664"
|
||||
contains:
|
||||
- /^include_dir = 'conf.d'/
|
||||
31
.vib/supabase-postgres/goss/vars.yaml
Normal file
31
.vib/supabase-postgres/goss/vars.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
binaries:
|
||||
- java
|
||||
- postgres
|
||||
- psql
|
||||
- pg_dump
|
||||
- pg_dumpall
|
||||
- pg_restore
|
||||
directories:
|
||||
- paths:
|
||||
- /opt/bitnami/supabase-postgres/migrations/db
|
||||
- mode: "0775"
|
||||
paths:
|
||||
- /bitnami/postgresql
|
||||
- /bitnami/postgresql/conf
|
||||
- /bitnami/postgresql/conf/conf.d
|
||||
- /docker-entrypoint-initdb.d
|
||||
- /opt/bitnami/postgresql/conf
|
||||
- /opt/bitnami/postgresql/conf/conf.d
|
||||
- /opt/bitnami/postgresql/logs
|
||||
- /opt/bitnami/postgresql/tmp
|
||||
files:
|
||||
- paths:
|
||||
- /opt/bitnami/supabase-postgres/migrations/00-schema.sql
|
||||
- /opt/bitnami/supabase-postgres/migrations/01-extension.sql
|
||||
- /opt/bitnami/postgresql/conf/pg_hba.conf
|
||||
- /opt/bitnami/postgresql/lib/timescaledb.so
|
||||
- /opt/bitnami/postgresql/share/extension/timescaledb.control
|
||||
root_dir: /opt/bitnami
|
||||
version:
|
||||
bin_name: postgres
|
||||
flag: --version
|
||||
@@ -3,7 +3,8 @@
|
||||
"resources": {
|
||||
"url": "{VIB_ENV_CONTAINER_URL}",
|
||||
"path": "{VIB_ENV_PATH}"
|
||||
}
|
||||
},
|
||||
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
|
||||
},
|
||||
"phases": {
|
||||
"package": {
|
||||
@@ -69,6 +70,21 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "goss",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib"
|
||||
},
|
||||
"tests_file": "supabase-postgres/goss/goss.yaml",
|
||||
"vars_file": "supabase-postgres/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-supabase-postgres"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
"resources": {
|
||||
"url": "{SHA_ARCHIVE}",
|
||||
"path": "{VIB_ENV_PATH}"
|
||||
}
|
||||
},
|
||||
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
|
||||
},
|
||||
"phases": {
|
||||
"package": {
|
||||
@@ -46,6 +47,21 @@
|
||||
"OS"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "goss",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib"
|
||||
},
|
||||
"tests_file": "supabase-postgres/goss/goss.yaml",
|
||||
"vars_file": "supabase-postgres/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-supabase-postgres"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user