mirror of
https://github.com/bitnami/containers.git
synced 2026-02-18 03:57:16 +08:00
[bitnami/harbor-registry] Add VIB tests (#31178)
* [bitnami/harbor-registry] Add initial tests Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/harbor-registry] Add change in docker-compose file to trigger tests Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/harbor-registry] Modify check-version test Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/harbor-registry] Fix binaries Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/harbor-registry] Add linked-to test Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/harbor-registry] Fix linked-to test Signed-off-by: Cori Avila <amisericordi@vmware.com> * [bitnami/harbor-registry] Delete trigger in docker-compose file Signed-off-by: Cori Avila <42420333+corico44@users.noreply.github.com> --------- Signed-off-by: Cori Avila <amisericordi@vmware.com> Signed-off-by: Cori Avila <42420333+corico44@users.noreply.github.com>
This commit is contained in:
12
.vib/harbor-registry/goss/goss.yaml
Normal file
12
.vib/harbor-registry/goss/goss.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
gossfile:
|
||||
# Goss tests exclusive to the current container
|
||||
../../harbor-registry/goss/harbor-registry.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-directories.yaml: {}
|
||||
../../common/goss/templates/check-linked-libraries.yaml: {}
|
||||
../../common/goss/templates/check-sed-in-place.yaml: {}
|
||||
../../common/goss/templates/check-spdx.yaml: {}
|
||||
30
.vib/harbor-registry/goss/harbor-registry.yaml
Normal file
30
.vib/harbor-registry/goss/harbor-registry.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
group:
|
||||
harbor:
|
||||
exists: true
|
||||
user:
|
||||
harbor:
|
||||
exists: true
|
||||
file:
|
||||
/var/lib/registry:
|
||||
exists: true
|
||||
mode: "0775"
|
||||
owner: harbor
|
||||
filetype: directory
|
||||
/storage:
|
||||
exists: true
|
||||
mode: "0775"
|
||||
owner: harbor
|
||||
filetype: directory
|
||||
/opt/bitnami/harbor-registry/bin/registry_DO_NOT_USE_GC:
|
||||
exists: true
|
||||
filetype: symlink
|
||||
linked-to: registry
|
||||
command:
|
||||
# Ensure a set of directories exist and the non-root user has write privileges to them
|
||||
check-directories-exist-with-user:
|
||||
exec: ls -dl /etc/ssl/certs /etc/pki/tls/certs/ 2>/dev/null | grep "drwxrwxr-x.*harbor"
|
||||
exit-status: 0
|
||||
# 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--.*harbor"
|
||||
exit-status: 0
|
||||
9
.vib/harbor-registry/goss/vars.yaml
Normal file
9
.vib/harbor-registry/goss/vars.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
binaries:
|
||||
- registry
|
||||
directories:
|
||||
- paths:
|
||||
- /etc/registry
|
||||
version:
|
||||
bin_name: registry
|
||||
flag: --version
|
||||
root_dir: /opt/bitnami
|
||||
@@ -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-registry/goss/goss.yaml",
|
||||
"vars_file": "harbor-registry/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-harbor-registry"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "trivy",
|
||||
"params": {
|
||||
|
||||
@@ -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-registry/goss/goss.yaml",
|
||||
"vars_file": "harbor-registry/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-harbor-registry"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "trivy",
|
||||
"params": {
|
||||
|
||||
Reference in New Issue
Block a user