[bitnami/harbor-notary-server] Add VIB tests (#31183)

* [bitnami/harbor-notary-server] Add initial tests

Signed-off-by: Cori Avila <amisericordi@vmware.com>

* [bitnami/harbor-notary-server] Add change in docker-compose file to trigger tests

Signed-off-by: Cori Avila <amisericordi@vmware.com>

* [bitnami/harbor-notary-server] Fix check-notary-server-binary exit-status value

Signed-off-by: Cori Avila <amisericordi@vmware.com>

* [bitnami/harbor-notary-server] Delete secondary binary test

Signed-off-by: corico44 <42420333+corico44@users.noreply.github.com>

* [bitnami/harbor-notary-server] Delete change in docker-compose file

Signed-off-by: Cori Avila <amisericordi@vmware.com>

---------

Signed-off-by: Cori Avila <amisericordi@vmware.com>
Signed-off-by: corico44 <42420333+corico44@users.noreply.github.com>
This commit is contained in:
Cori Avila
2023-05-11 11:04:17 +02:00
committed by GitHub
parent 277e715832
commit e90a6e2ecf
5 changed files with 69 additions and 2 deletions
+10
View File
@@ -0,0 +1,10 @@
gossfile:
# Goss tests exclusive to the current container
../../harbor-notary-server/goss/harbor-notary-server.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: {}
../../common/goss/templates/check-spdx.yaml: {}
@@ -0,0 +1,21 @@
group:
harbor:
exists: true
user:
harbor:
exists: true
file:
/etc/notary:
exists: true
mode: "0775"
owner: harbor
filetype: directory
command:
# Ensure permissions for Internal TLS
check-permissions-system-certs:
exec: ls -l /etc/pki/tls/certs/ca-bundle.crt /etc/pki/tls/certs/ca-bundle.trust.crt /etc/ssl/certs/ca-certificates.crt 2>/dev/null | grep ".*-rw-rw-r--"
exit-status: 0
check-notary-server-binary:
exec: notary-server -h
exit-status: 2
+4
View File
@@ -0,0 +1,4 @@
binaries:
- notary-server
- migrate
root_dir: /opt/bitnami
+17 -1
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": "harbor-notary-server/goss/goss.yaml",
"vars_file": "harbor-notary-server/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-harbor-notary-server"
}
}
}
},
{
"action_id": "trivy",
"params": {
+17 -1
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": "harbor-notary-server/goss/goss.yaml",
"vars_file": "harbor-notary-server/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-harbor-notary-server"
}
}
}
},
{
"action_id": "trivy",
"params": {