mirror of
https://github.com/bitnami/containers.git
synced 2026-03-27 07:17:59 +08:00
[bitnami/cassandra] Add VIB tests (#27809)
* [bitnami/cassandra] Add VIB tests Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com> * Trigger VIB Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com> * Remove specific test file Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com> * Add excludePaths in sed-in-place Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com> * Fix indentification of optional paths Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com> * Fix command Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com> * Test 4.0 Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com> * Remove VIB trigger Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com> * Apply suggestions Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com> --------- Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com>
This commit is contained in:
committed by
GitHub
parent
f40225761e
commit
d74dfb6eed
@@ -7,5 +7,8 @@ set -o pipefail
|
||||
mapfile -t files < <( find /bitnami "$BITNAMI_ROOT_DIR" -name '*.sh' )
|
||||
|
||||
for file in "${files[@]}"; do
|
||||
if [[ -n $EXCLUDE_PATHS ]] && [[ "$file" =~ $EXCLUDE_PATHS ]]; then
|
||||
continue
|
||||
fi
|
||||
[[ $(grep -cE "sed -i|sed --in-place" "$file") -eq 0 ]] || exit 1
|
||||
done
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
# Needed vars:
|
||||
# - .Vars.directories (Array)
|
||||
# - .Vars.directories.paths (Array)
|
||||
# - .Vars.directories.mode (Optional - String)
|
||||
# Optional vars:
|
||||
# - .Vars.directories.mode (String)
|
||||
########################
|
||||
file:
|
||||
{{ range .Vars.directories }}
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
# Needed vars:
|
||||
# - .Vars.files (Array)
|
||||
# - .Vars.files.paths (Array)
|
||||
# - .Vars.files.mode (Optional - String)
|
||||
# Optional vars:
|
||||
# - .Vars.files.mode (String)
|
||||
########################
|
||||
file:
|
||||
{{ range .Vars.files }}
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
# Check components executables have no missing linked libraries
|
||||
# Needed vars:
|
||||
# - .Vars.root_dir
|
||||
# - .Vars.linked_libraries.exclude_paths (Optional - Array)
|
||||
# Optional vars:
|
||||
# - .Vars.linked_libraries.exclude_paths (Array)
|
||||
########################
|
||||
command:
|
||||
check-linked-libraries:
|
||||
{{ $exclude_paths := "" }}
|
||||
{{ if contains "exclude_paths:" (.Vars | toString) }}
|
||||
{{ if contains "linked_libraries:map[exclude_paths:" (.Vars | toString) }}
|
||||
{{ $exclude_paths = (.Vars.linked_libraries.exclude_paths | join "|") }}
|
||||
{{ end }}
|
||||
exec: export BITNAMI_ROOT_DIR={{ .Vars.root_dir }} && export EXCLUDE_PATHS='{{ $exclude_paths }}' && ./common/goss/scripts/check-linked-libraries.sh
|
||||
|
||||
@@ -3,8 +3,15 @@
|
||||
# to sed commands with the in-place argument
|
||||
# Needed vars:
|
||||
# - .Vars.root_dir
|
||||
# Optional vars:
|
||||
# - .Vars.sed_in_place.exclude_paths (Array)
|
||||
########################
|
||||
command:
|
||||
check-sed-in-place:
|
||||
exec: export BITNAMI_ROOT_DIR={{ .Vars.root_dir }} && ./common/goss/scripts/check-sed-in-place.sh
|
||||
{{ $exclude_paths := "" }}
|
||||
{{ if contains "sed_in_place:map[exclude_paths:" (.Vars | toString) }}
|
||||
{{ $exclude_paths = (.Vars.sed_in_place.exclude_paths | join "|") }}
|
||||
{{ end }}
|
||||
exec: export BITNAMI_ROOT_DIR={{ .Vars.root_dir }} && export EXCLUDE_PATHS='{{ $exclude_paths }}' && ./common/goss/scripts/check-sed-in-place.sh
|
||||
timeout: 20000
|
||||
exit-status: 0
|
||||
|
||||
Reference in New Issue
Block a user