mirror of
https://github.com/bitnami/containers.git
synced 2026-03-27 07:17:59 +08:00
[bitnami/*] Refactor Goss' common tests (#24127)
* [bitnami/*] Refactor Goss' common tests Signed-off-by: FraPazGal <fdepaz@vmware.com> * Trigger VIB for MariaDB Signed-off-by: FraPazGal <fdepaz@vmware.com> * Fix path typo Signed-off-by: FraPazGal <fdepaz@vmware.com> * Trigger VIB for WordPress Signed-off-by: FraPazGal <fdepaz@vmware.com> * Trigger VIB for Apache Signed-off-by: FraPazGal <fdepaz@vmware.com> * Remove VIB triggers Signed-off-by: FraPazGal <fdepaz@vmware.com> * Add missing MariaDB tests and launch VIB pipeline Signed-off-by: FraPazGal <fdepaz@vmware.com> * Remove VIB trigger Signed-off-by: FraPazGal <fdepaz@vmware.com> --------- Signed-off-by: FraPazGal <fdepaz@vmware.com>
This commit is contained in:
committed by
GitHub
parent
8a5fd25163
commit
9d243a6d23
@@ -1,10 +1,10 @@
|
||||
########################
|
||||
# Checks components binaries are added to the $PATH
|
||||
# Checks binaries are added to the $PATH
|
||||
# Needed vars:
|
||||
# - .Vars.components.binaries (Array)
|
||||
# - .Vars.binaries (Array)
|
||||
########################
|
||||
command:
|
||||
{{ range $binary := .Vars.components.binaries }}
|
||||
{{ range $binary := .Vars.binaries }}
|
||||
check-{{ $binary }}-binary:
|
||||
exec: which {{ $binary }}
|
||||
exit-status: 0
|
||||
@@ -1,11 +0,0 @@
|
||||
########################
|
||||
# Checks components directories exist
|
||||
# Needed vars:
|
||||
# - .Vars.components.directories (Array)
|
||||
########################
|
||||
file:
|
||||
{{ range $directory := .Vars.components.directories }}
|
||||
{{ $directory }}:
|
||||
exists: true
|
||||
filetype: directory
|
||||
{{ end }}
|
||||
@@ -1,11 +0,0 @@
|
||||
########################
|
||||
# Checks components files exist
|
||||
# Needed vars:
|
||||
# - .Vars.components.files (Array)
|
||||
########################
|
||||
file:
|
||||
{{ range $file := .Vars.components.files }}
|
||||
{{ $file }}:
|
||||
exists: true
|
||||
filetype: file
|
||||
{{ end }}
|
||||
@@ -1,17 +0,0 @@
|
||||
########################
|
||||
# Checks directories permissions, usually changed in the postunpack stage
|
||||
# Needed vars:
|
||||
# - .Vars.filesystem (Array)
|
||||
# - .Vars.filesystem.directories (Array)
|
||||
# - .Vars.filesystem.mode (String)
|
||||
########################
|
||||
file:
|
||||
{{ range .Vars.filesystem }}
|
||||
{{ $mode := .mode }}
|
||||
{{ range $directory := .directories }}
|
||||
{{ $directory }}:
|
||||
exists: true
|
||||
filetype: directory
|
||||
mode: "{{ $mode }}"
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
23
.vib/common/goss/templates/check-directories.yaml
Normal file
23
.vib/common/goss/templates/check-directories.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
########################
|
||||
# Checks directories exist,
|
||||
# optionally checking their permissions
|
||||
# Needed vars:
|
||||
# - .Vars.directories (Array)
|
||||
# - .Vars.directories.paths (Array)
|
||||
# - .Vars.directories.mode (Optional - String)
|
||||
########################
|
||||
file:
|
||||
{{ range .Vars.directories }}
|
||||
{{ $mode := "" }}
|
||||
{{ if (gt (len .) 1) }}
|
||||
{{ $mode = .mode }}
|
||||
{{ end }}
|
||||
{{ range $directory := .paths }}
|
||||
{{ $directory }}:
|
||||
exists: true
|
||||
filetype: directory
|
||||
{{ if $mode }}
|
||||
mode: "{{ $mode }}"
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
23
.vib/common/goss/templates/check-files.yaml
Normal file
23
.vib/common/goss/templates/check-files.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
########################
|
||||
# Checks files exist,
|
||||
# optionally checking their permissions
|
||||
# Needed vars:
|
||||
# - .Vars.files (Array)
|
||||
# - .Vars.files.paths (Array)
|
||||
# - .Vars.directories.mode (Optional - String)
|
||||
########################
|
||||
file:
|
||||
{{ range .Vars.files }}
|
||||
{{ $mode := "" }}
|
||||
{{ if (gt (len .) 1) }}
|
||||
{{ $mode = .mode }}
|
||||
{{ end }}
|
||||
{{ range $file := .paths }}
|
||||
{{ $file }}:
|
||||
exists: true
|
||||
filetype: file
|
||||
{{ if $mode }}
|
||||
mode: "{{ $mode }}"
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user