[bitnami/tomcat] Add VIB tests (#29058)

* [bitnami/tomcat] Add VIB tests

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Fix permission typo

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Remove VIB trigger

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Apply suggestions

Signed-off-by: FraPazGal <fdepaz@vmware.com>

---------

Signed-off-by: FraPazGal <fdepaz@vmware.com>
This commit is contained in:
Francisco de Paz Galan
2023-04-11 18:18:02 +02:00
committed by GitHub
parent f0c1842a98
commit 6db899f685
5 changed files with 97 additions and 5 deletions
+12
View File
@@ -0,0 +1,12 @@
gossfile:
# Goss tests exclusive to the current container
../../tomcat/goss/tomcat.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: {}
+25
View File
@@ -0,0 +1,25 @@
file:
/opt/bitnami/apache-tomcat:
exists: true
filetype: symlink
linked-to: tomcat
/opt/bitnami/tomcat/webapps:
exists: true
filetype: symlink
linked-to: /bitnami/tomcat/webapps
/app:
exists: true
filetype: symlink
linked-to: /bitnami/tomcat/webapps
command:
check-app-version:
exec: version.sh
exit-status: 0
stdout:
- {{ .Env.APP_VERSION }}
group:
tomcat:
exists: true
user:
tomcat:
exists: true
+23
View File
@@ -0,0 +1,23 @@
binaries:
- gosu
- java
- render-template
directories:
- mode: "0775"
paths:
- /bitnami/tomcat/webapps
- /opt/bitnami/tomcat
- /opt/bitnami/tomcat/lib
- /opt/bitnami/tomcat/temp
- /opt/bitnami/tomcat/logs
- /opt/bitnami/tomcat/conf
- /opt/bitnami/tomcat/work
- /opt/bitnami/tomcat/webapps_default
files:
- mode: "0664"
paths:
- /opt/bitnami/tomcat/bin/setenv.sh
- mode: "0755"
paths:
- /opt/bitnami/tomcat/bin/version.sh
root_dir: /opt/bitnami
+20 -4
View File
@@ -3,7 +3,8 @@
"resources": {
"url": "{VIB_ENV_CONTAINER_URL}",
"path": "{VIB_ENV_PATH}"
}
},
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
},
"phases": {
"package": {
@@ -77,9 +78,24 @@
"url": "{VIB_ENV_PACKAGES_JSON_URL}",
"path": "/{VIB_ENV_PATH}",
"authn": {
"header": "Authorization",
"token": "Bearer {VIB_ENV_GITHUB_TOKEN}"
}
"header": "Authorization",
"token": "Bearer {VIB_ENV_GITHUB_TOKEN}"
}
}
}
},
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "tomcat/goss/goss.yaml",
"vars_file": "tomcat/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-tomcat"
}
}
}
}
+17 -1
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": "tomcat/goss/goss.yaml",
"vars_file": "tomcat/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-tomcat"
}
}
}
}
]
}