[bitnami/git] Add VIB tests to Git container (#26791)

* [bitnami/git] Add Git container VIB tests

Signed-off-by: Michiel <michield@vmware.com>
This commit is contained in:
Michiel
2023-03-21 09:11:02 +01:00
committed by GitHub
parent 2d251095b2
commit 3afea13e84
5 changed files with 59 additions and 2 deletions

7
.vib/git/goss/git.yaml Normal file
View File

@@ -0,0 +1,7 @@
command:
check-git-init:
exec: git init {{randAlpha 5}}
exit-status: 0
check-git-clone:
exec: git clone https://github.com/bitnami/bncert.git {{randAlpha 5}}
exit-status: 0

11
.vib/git/goss/goss.yaml Normal file
View File

@@ -0,0 +1,11 @@
gossfile:
# Goss tests exclusive to the current container
../../git/goss/git.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-linked-libraries.yaml: {}
../../common/goss/templates/check-sed-in-place.yaml: {}
../../common/goss/templates/check-spdx.yaml: {}

7
.vib/git/goss/vars.yaml Normal file
View File

@@ -0,0 +1,7 @@
binaries:
- git
- gosu
root_dir: /opt/bitnami
version:
bin_name: git
flag: --version

View File

@@ -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": "git/goss/goss.yaml",
"vars_file": "git/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-git"
}
}
}
},
{
"action_id": "trivy",
"params": {

View File

@@ -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": "git/goss/goss.yaml",
"vars_file": "git/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-git"
}
}
}
},
{
"action_id": "trivy",
"params": {