mirror of
https://github.com/bitnami/containers.git
synced 2026-10-18 08:12:12 +02:00
[bitnami/node] Add verification tests for NodeJS container (#26064)
* [bitnami/node] Add verification tests for NodeJS container Signed-off-by: Michiel <michield@vmware.com>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
gossfile:
|
||||
# Goss tests exclusive to the current container
|
||||
../../node/goss/node.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-directories.yaml: {}
|
||||
../../common/goss/templates/check-linked-libraries.yaml: {}
|
||||
../../common/goss/templates/check-sed-in-place.yaml: {}
|
||||
@@ -0,0 +1,14 @@
|
||||
command:
|
||||
# Node can run a simple 'Hello World' program
|
||||
check-node:
|
||||
exec: "node -e \"console.log('Hello World')\""
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- Hello World
|
||||
check-global-modules:
|
||||
exec: npm list -g
|
||||
exit-status: 0
|
||||
stdout:
|
||||
{{ range $module := .Vars.modules }}
|
||||
- {{ $module }}
|
||||
{{ end }}
|
||||
@@ -0,0 +1,19 @@
|
||||
binaries:
|
||||
- node
|
||||
- npm
|
||||
- npx
|
||||
- node-gyp
|
||||
- python
|
||||
- yarn
|
||||
directories:
|
||||
- mode: "0755"
|
||||
paths:
|
||||
- /app
|
||||
root_dir: /opt/bitnami
|
||||
modules:
|
||||
- node-gyp
|
||||
- npm
|
||||
- yarn
|
||||
version:
|
||||
bin_name: node
|
||||
flag: --version
|
||||
@@ -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": "node/goss/goss.yaml",
|
||||
"vars_file": "node/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-node"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "trivy",
|
||||
"params": {
|
||||
@@ -91,4 +107,4 @@
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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": "node/goss/goss.yaml",
|
||||
"vars_file": "node/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-node"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "trivy",
|
||||
"params": {
|
||||
|
||||
Reference in New Issue
Block a user