[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:
Francisco de Paz Galan
2023-02-24 18:33:21 +01:00
committed by GitHub
parent fded8c3d26
commit 1d5b98b524
5 changed files with 61 additions and 3 deletions

View 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

View 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: {}

View File

@@ -0,0 +1,3 @@
binaries:
- go
root_dir: /opt/bitnami