[bitnami/openldap] Add VIB tests (#28164)

* [bitnami/openldap] Add VIB tests

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Trigger VIB

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Trigger VIB for remaining branches

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Remove VIB trigger

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Remove unused vars

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Apply suggestions

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Modify version check

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-04-04 10:05:08 +02:00
committed by GitHub
parent df1dddb240
commit 73468787c1
5 changed files with 125 additions and 5 deletions
+12
View File
@@ -0,0 +1,12 @@
gossfile:
# Goss tests exclusive to the current container
../../openldap/goss/openldap.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-directories.yaml: {}
../../common/goss/templates/check-files.yaml: {}
../../common/goss/templates/check-linked-libraries.yaml: {}
../../common/goss/templates/check-sed-in-place.yaml: {}
../../common/goss/templates/check-spdx.yaml: {}
+40
View File
@@ -0,0 +1,40 @@
file:
/opt/bitnami/openldap/etc/slapd.d:
exists: true
filetype: symlink
linked-to: /bitnami/openldap/slapd.d
/opt/bitnami/openldap/var/data:
exists: true
filetype: symlink
linked-to: /bitnami/openldap/data
/opt/bitnami/openldap/sbin/slapadd:
exists: true
filetype: symlink
linked-to: /opt/bitnami/openldap/sbin/slapd
/opt/bitnami/openldap/etc/slapd.conf.default:
exists: false
{{ range $package := .Vars.packages }}
{{ $package }}:
exists: true
{{ end }}
command:
check-app-version:
exec: {{ .Vars.version.bin_name }} {{ .Vars.version.flag }} 2>&1
exit-status: 0
stdout:
- {{ .Env.APP_VERSION }}
check-enabled-backends:
exec: slapd -VVV 2>&1
exit-status: 0
stdout:
{{ range $backend := .Vars.backends }}
- "{{ $backend }}"
{{ end }}
# slapd doesn't have a '-h' flag to print the available options
check-enabled-features:
exec: slapd -h 2>&1
exit-status: 1
stdout:
{{ range $feature := .Vars.features }}
- "{{ $feature }}"
{{ end }}
+36
View File
@@ -0,0 +1,36 @@
backends:
- mdb
- monitor
binaries:
- gosu
- ldapsearch
- slapd
directories:
- mode: "0775"
paths:
- /bitnami/openldap/data
- /bitnami/openldap/slapd.d
- /opt/bitnami/openldap/share
- /opt/bitnami/openldap/var
- /docker-entrypoint-initdb.d
- paths:
- /opt/bitnami/openldap/etc/certs
features:
- Debug
- Syslog
- IPv6
- LOCAL
files:
- paths:
- /opt/bitnami/openldap/sbin/slapd
- /opt/bitnami/openldap/share/slapd.ldif
packages:
- /opt/bitnami/openldap/lib/libslapi.so
- /opt/bitnami/openldap/lib/openldap/argon2.so
- /opt/bitnami/openldap/lib/openldap/dyngroup.so
- /opt/bitnami/openldap/libexec/openldap/pw-pbkdf2.so
- /opt/bitnami/openldap/libexec/openldap/pw-sha2.so
root_dir: /opt/bitnami
version:
bin_name: slapd
flag: -VVV
+20 -4
View File
@@ -3,7 +3,8 @@
"resources": {
"url": "{VIB_ENV_CONTAINER_URL}",
"path": "{VIB_ENV_PATH}"
}
},
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
},
"phases": {
"package": {
@@ -76,9 +77,24 @@
"url": "{VIB_ENV_PACKAGES_JSON_URL}",
"path": "/{VIB_ENV_PATH}",
"authn": {
"header": "Authorization",
"token": "Bearer {VIB_ENV_GITHUB_TOKEN}"
}
"header": "Authorization",
"token": "Bearer {VIB_ENV_GITHUB_TOKEN}"
}
}
}
},
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "openldap/goss/goss.yaml",
"vars_file": "openldap/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-openldap"
}
}
}
}
+17 -1
View File
@@ -3,7 +3,8 @@
"resources": {
"url": "{SHA_ARCHIVE}",
"path": "{VIB_ENV_PATH}"
}
},
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
},
"phases": {
"package": {
@@ -46,6 +47,21 @@
"OS"
]
}
},
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "openldap/goss/goss.yaml",
"vars_file": "openldap/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-openldap"
}
}
}
}
]
}