[bitnami/nginx-ingress-controller] Add VIB tests (#34401)

Signed-off-by: Andrés Bono <andresbono@vmware.com>
This commit is contained in:
Andrés Bono 2023-05-26 17:05:08 +02:00 committed by GitHub
parent aedf1ba810
commit ef09e2bdcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 73 additions and 2 deletions

View File

@ -0,0 +1,11 @@
gossfile:
# Goss tests exclusive to the current container
../../nginx-ingress-controller/goss/nginx-ingress-controller.yaml: {}
# Load scripts from .vib/common/goss/templates
../../common/goss/templates/check-app-version.yaml: {}
../../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,21 @@
file:
/opt/bitnami/common/lib/libmaxminddb.so:
exists: true
/var/log/nginx/access.log:
exists: true
filetype: symlink
linked-to: /dev/stdout
/var/log/nginx/error.log:
exists: true
filetype: symlink
linked-to: /dev/stderr
command:
test-nginx-config:
exec: nginx -t
exit-status: 0
test-capabilities:
exec: getcap /nginx-ingress-controller /usr/local/nginx/sbin/nginx
exit-status: 0
stdout:
- nginx-ingress-controller cap_net_bind_service=ep
- nginx cap_net_bind_service=ep

View File

@ -0,0 +1,7 @@
binaries:
- nginx-ingress-controller
- nginx
root_dir: /opt/bitnami
version:
bin_name: nginx-ingress-controller
flag: --version

View File

@ -3,7 +3,8 @@
"resources": {
"url": "{VIB_ENV_CONTAINER_URL}",
"path": "{VIB_ENV_PATH}"
}
},
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
},
"phases": {
"package": {
@ -82,6 +83,21 @@
}
}
}
},
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "nginx-ingress-controller/goss/goss.yaml",
"vars_file": "nginx-ingress-controller/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-nginx-ingress-controller"
}
}
}
}
]
},

View File

@ -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": "nginx-ingress-controller/goss/goss.yaml",
"vars_file": "nginx-ingress-controller/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-nginx-ingress-controller"
}
}
}
}
]
}