mirror of
https://github.com/bitnami/containers.git
synced 2026-03-27 15:27:48 +08:00
[bitnami/golang] Add VIB tests (#24157)
* [bitnami/golang] Add VIB tests Signed-off-by: FraPazGal <fdepaz@vmware.com> * Remove VIB trigger Signed-off-by: FraPazGal <fdepaz@vmware.com> * Update pipelines' DSL definitions Signed-off-by: FraPazGal <fdepaz@vmware.com> * Remove VIB trigger Signed-off-by: FraPazGal <fdepaz@vmware.com> * Apply suggestions and launch verification 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
fded8c3d26
commit
1d5b98b524
14
.vib/golang/goss/golang.yaml
Normal file
14
.vib/golang/goss/golang.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
command:
|
||||
# Major and Minor versions are often shown as "x.0" and "x.y" instead of "x.0.0" and "x.y.0"
|
||||
check-app-version:
|
||||
exec: go version | grep "$(echo $APP_VERSION | sed -E 's|([0-9]+\.[0-9]+)\.0$|\1|g')"
|
||||
exit-status: 0
|
||||
check-go-build:
|
||||
{{- $filename := printf "test_%s" (randAlpha 5) }}
|
||||
exec: |
|
||||
echo 'package main; import "fmt"; func main() { fmt.Println("Hello VIB") }' > {{ $filename }}.go && \
|
||||
go build {{ $filename }}.go && \
|
||||
./{{ $filename }}
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- Hello VIB
|
||||
9
.vib/golang/goss/goss.yaml
Normal file
9
.vib/golang/goss/goss.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
gossfile:
|
||||
# Goss tests exclusive to the current container
|
||||
../../golang/goss/golang.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-linked-libraries.yaml: {}
|
||||
../../common/goss/templates/check-sed-in-place.yaml: {}
|
||||
3
.vib/golang/goss/vars.yaml
Normal file
3
.vib/golang/goss/vars.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
binaries:
|
||||
- go
|
||||
root_dir: /opt/bitnami
|
||||
Reference in New Issue
Block a user