mirror of
https://github.com/bitnami/containers.git
synced 2026-03-21 15:29:05 +08:00
[bitnami/fluentd] Add VIB tests (#31115)
* [bitnami/fluentd] Add initial tests Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/fluentd] Add check for directories and files Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/fluentd] Add change in docker-compose file to trigger tests Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/fluentd] Modify check-version test Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/fluentd] Fix check-no-pem-files test Signed-off-by: corico44 <42420333+corico44@users.noreply.github.com> * [bitnami/fluentd] Add check for directories Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/fluentd] Change format for check gems test Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/fluentd] Fix gem test Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/fluentd] Fix check for plugin files Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/fluentd] 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: corico44 <42420333+corico44@users.noreply.github.com> Signed-off-by: Cori Avila <42420333+corico44@users.noreply.github.com>
This commit is contained in:
15
.vib/fluentd/goss/fluentd.yaml
Normal file
15
.vib/fluentd/goss/fluentd.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
command:
|
||||
check-no-pem-files:
|
||||
exec: find /opt/bitnami/fluentd -name "*.pem" | grep .
|
||||
exit-status: 1
|
||||
check-fluent-plugin-detect-exceptions:
|
||||
# Ensure that all files have the correct permissions
|
||||
exec: ls -l /opt/bitnami/fluentd/gems/fluent-plugin-detect-exceptions-*/lib/fluent/plugin/*.rb 2>/dev/null | grep -v ".*-rwxrwxr-x"
|
||||
exit-status: 1
|
||||
check-plugins:
|
||||
exec: gem list --local
|
||||
exit-status: 0
|
||||
stdout:
|
||||
{{ range $gem := .Vars.modules.gems }}
|
||||
- "{{ $gem }}"
|
||||
{{ end }}
|
||||
12
.vib/fluentd/goss/goss.yaml
Normal file
12
.vib/fluentd/goss/goss.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
gossfile:
|
||||
# Goss tests exclusive to the current container
|
||||
../../fluentd/goss/fluentd.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: {}
|
||||
../../common/goss/templates/check-spdx.yaml: {}
|
||||
36
.vib/fluentd/goss/vars.yaml
Normal file
36
.vib/fluentd/goss/vars.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
binaries:
|
||||
- fluentd
|
||||
- ruby
|
||||
directories:
|
||||
- mode: "0775"
|
||||
paths:
|
||||
- /opt/bitnami/fluentd/gems
|
||||
- /opt/bitnami/fluentd/specifications
|
||||
- /opt/bitnami/fluentd/cache
|
||||
- /opt/bitnami/fluentd/doc
|
||||
- /opt/bitnami/fluentd/conf
|
||||
- /opt/bitnami/fluentd/logs
|
||||
- /opt/bitnami/fluentd/plugins
|
||||
modules:
|
||||
gems:
|
||||
- fluent-plugin-concat
|
||||
- fluent-plugin-detect-exceptions
|
||||
- fluent-plugin-elasticsearch
|
||||
- fluent-plugin-grafana-loki
|
||||
- fluent-plugin-kafka
|
||||
- fluent-plugin-kubernetes_metadata_filter
|
||||
- fluent-plugin-multi-format-parser
|
||||
- fluent-plugin-prometheus
|
||||
- fluent-plugin-rewrite-tag-filter
|
||||
- fluent-plugin-s3
|
||||
- fluent-plugin-systemd
|
||||
- fluent-plugin-record-modifier
|
||||
- oj
|
||||
- json
|
||||
- fluentd
|
||||
- activesupport
|
||||
- elasticsearch-xpack
|
||||
version:
|
||||
bin_name: fluentd
|
||||
flag: --version
|
||||
root_dir: /opt/bitnami
|
||||
@@ -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": "fluentd/goss/goss.yaml",
|
||||
"vars_file": "fluentd/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-fluentd"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"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": "fluentd/goss/goss.yaml",
|
||||
"vars_file": "fluentd/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-fluentd"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "trivy",
|
||||
"params": {
|
||||
|
||||
Reference in New Issue
Block a user