[bitnami/tomcat-jdk] Add tests for tomcat-jdk (#46946)

* [bitnami/tomcat-jdk] Add tests for tomcat-jdk

Signed-off-by: David Gomez <dgomezleon@vmware.com>

* [bitnami/tomcat-jdk] Apply feedback

Signed-off-by: David Gomez <dgomezleon@vmware.com>

---------

Signed-off-by: David Gomez <dgomezleon@vmware.com>
This commit is contained in:
David Gomez
2023-09-01 14:30:28 +02:00
committed by GitHub
parent fe763b3a12
commit dd43899311
8 changed files with 276 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
# Copyright VMware, Inc.
# SPDX-License-Identifier: APACHE-2.0
gossfile:
# Goss tests exclusive to the current container
../../tomcat-jdk-11/goss/tomcat-jdk-11.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: {}

View File

@@ -0,0 +1,28 @@
# Copyright VMware, Inc.
# SPDX-License-Identifier: APACHE-2.0
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

View File

@@ -0,0 +1,22 @@
binaries:
- 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

View File

@@ -0,0 +1,73 @@
{
"context": {
"resources": {
"url": "{SHA_ARCHIVE}",
"path": "{VIB_ENV_PATH}"
},
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
},
"phases": {
"package": {
"actions": [
{
"action_id": "container-image-package",
"params": {
"application": {
"details": {
"name": "{VIB_ENV_CONTAINER}",
"tag": "{VIB_ENV_TAG}"
}
},
"architectures": [
"linux/amd64",
"linux/arm64"
]
}
},
{
"action_id": "container-image-lint",
"params": {
"threshold": "error"
}
}
]
},
"verify": {
"actions": [
{
"action_id": "trivy",
"params": {
"threshold": "CRITICAL",
"vuln_type": [
"OS"
]
}
},
{
"action_id": "grype",
"params": {
"threshold": "CRITICAL",
"package_type": [
"OS"
]
}
},
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "tomcat-jdk-11/goss/goss.yaml",
"vars_file": "tomcat-jdk-11/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-tomcat-jdk-11"
}
}
}
}
]
}
}
}

View File

@@ -0,0 +1,15 @@
# Copyright VMware, Inc.
# SPDX-License-Identifier: APACHE-2.0
gossfile:
# Goss tests exclusive to the current container
../../tomcat-jdk-17/goss/tomcat-jdk-17.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: {}

View File

@@ -0,0 +1,28 @@
# Copyright VMware, Inc.
# SPDX-License-Identifier: APACHE-2.0
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

View File

@@ -0,0 +1,22 @@
binaries:
- 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

View File

@@ -0,0 +1,73 @@
{
"context": {
"resources": {
"url": "{SHA_ARCHIVE}",
"path": "{VIB_ENV_PATH}"
},
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
},
"phases": {
"package": {
"actions": [
{
"action_id": "container-image-package",
"params": {
"application": {
"details": {
"name": "{VIB_ENV_CONTAINER}",
"tag": "{VIB_ENV_TAG}"
}
},
"architectures": [
"linux/amd64",
"linux/arm64"
]
}
},
{
"action_id": "container-image-lint",
"params": {
"threshold": "error"
}
}
]
},
"verify": {
"actions": [
{
"action_id": "trivy",
"params": {
"threshold": "CRITICAL",
"vuln_type": [
"OS"
]
}
},
{
"action_id": "grype",
"params": {
"threshold": "CRITICAL",
"package_type": [
"OS"
]
}
},
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "tomcat-jdk-17/goss/goss.yaml",
"vars_file": "tomcat-jdk-17/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-tomcat-jdk-17"
}
}
}
}
]
}
}
}