[bitnami/kong] Add VIB tests (#31816)
* [bitnami/kong] Add initial tests Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/kong] Add check-version test Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/kong] Fix kong.conf path and version test Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/kong] Add change in docker-compose file to trigger tests Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/kong] Fix opentelemetry filetype parameter Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/kong] Fix luarocks path text Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/kong] Fix check-app-version test Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/kong] Delete check-app-version test Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/kong] Fix check-app-version test Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/kong] Fix check-app-version test Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/kong] Fix check-app-version test Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/kong] Fix check-app-version test Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/kong] Fix check-app-version test Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/kong] Add check version app test and check nginx binary Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/kong] Test kong version Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/kong] Test kong version Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/kong] Delete check kong version Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/kong] 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:
parent
77eed4627e
commit
d07b5ede85
|
|
@ -0,0 +1,12 @@
|
|||
gossfile:
|
||||
# Goss tests exclusive to the current container
|
||||
../../kong/goss/kong.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: {}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
group:
|
||||
kong:
|
||||
exists: true
|
||||
user:
|
||||
kong:
|
||||
exists: true
|
||||
file:
|
||||
/opt/bitnami/kong/conf/kong.conf:
|
||||
exists: true
|
||||
contains:
|
||||
- "prefix = /opt/bitnami/kong/server"
|
||||
- "nginx_daemon = off"
|
||||
- "nginx_user = kong"
|
||||
/opt/bitnami/scripts/kong-env.sh:
|
||||
exists: true
|
||||
contains:
|
||||
- "'luarocks path' configuration"
|
||||
/etc/bash.bashrc:
|
||||
exists: true
|
||||
contains:
|
||||
- "'luarocks path' configuration"
|
||||
/usr/local/kong/include/opentelemetry:
|
||||
exists: true
|
||||
filetype: symlink
|
||||
command:
|
||||
# Ensure that there is no uncommented read-only postgres connection parameter in the main Kong configuration file
|
||||
check-read-only-conf-values:
|
||||
exec: grep -E '^pg_ro.+=.+' /opt/bitnami/kong/conf/kong.conf
|
||||
exit-status: 1
|
||||
# Ensure that all non-empty keys in the main Kong configuration file are uncommented
|
||||
check-status-all-non-empty-keys:
|
||||
exec: grep -E '^#+([a-z_ ]+)=\s*[^# ]' /opt/bitnami/kong/conf/kong.conf | grep -v 'pg_ro'
|
||||
exit-status: 1
|
||||
check-nginx-run:
|
||||
exec: nginx -V
|
||||
exit-status: 0
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
binaries:
|
||||
- kong
|
||||
- render-template
|
||||
directories:
|
||||
- mode: "0775"
|
||||
paths:
|
||||
- /opt/bitnami/kong/server
|
||||
- /opt/bitnami/kong/conf
|
||||
- paths:
|
||||
- /docker-entrypoint-initdb.d
|
||||
- /opt/bitnami/kong/openresty/luajit/share/lua/5.1/kong/include/opentelemetry
|
||||
- /opt/bitnami/kong/bin
|
||||
- /opt/bitnami/kong/server/lib
|
||||
files:
|
||||
- paths:
|
||||
- /opt/bitnami/kong/server/lib/pluginsocket.proto
|
||||
root_dir: /opt/bitnami
|
||||
|
|
@ -3,7 +3,8 @@
|
|||
"resources": {
|
||||
"url": "{VIB_ENV_CONTAINER_URL}",
|
||||
"path": "{VIB_ENV_PATH}"
|
||||
}
|
||||
},
|
||||
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
|
||||
},
|
||||
"phases": {
|
||||
"package": {
|
||||
|
|
@ -32,6 +33,21 @@
|
|||
},
|
||||
"verify": {
|
||||
"actions": [
|
||||
{
|
||||
"action_id": "goss",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib"
|
||||
},
|
||||
"tests_file": "kong/goss/goss.yaml",
|
||||
"vars_file": "kong/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-kong"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "trivy",
|
||||
"params": {
|
||||
|
|
|
|||
|
|
@ -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": "kong/goss/goss.yaml",
|
||||
"vars_file": "kong/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-kong"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "trivy",
|
||||
"params": {
|
||||
|
|
|
|||
Loading…
Reference in New Issue