Skip to content

Commit

Permalink
[bitnami/harbor-*] Adapt test to work in all distros
Browse files Browse the repository at this point in the history
Signed-off-by: Jota Martos <[email protected]>
  • Loading branch information
jotamartos committed Sep 1, 2023
1 parent 69562ef commit 285d5f8
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .vib/harbor-adapter-trivy/goss/harbor-adapter-trivy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ command:
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--"
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 "^.\{5\}w.*harbor"
exit-status: 0
4 changes: 2 additions & 2 deletions .vib/harbor-core/goss/harbor-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ file:
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
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 "^.\{5\}w.*harbor"
exit-status: 0
2 changes: 1 addition & 1 deletion .vib/harbor-exporter/goss/harbor-exporter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ command:
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--"
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 "^.\{5\}w.*harbor"
exit-status: 0
4 changes: 2 additions & 2 deletions .vib/harbor-jobservice/goss/harbor-jobservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ command:
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--"
exit-status: 0
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 "^.\{5\}w.*harbor"
exit-status: 0
2 changes: 1 addition & 1 deletion .vib/harbor-notary-server/goss/harbor-notary-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ file:
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--"
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 "^.\{5\}w.*harbor"
exit-status: 0
check-notary-server-binary:
exec: notary-server -h
Expand Down
4 changes: 2 additions & 2 deletions .vib/harbor-portal/goss/harbor-portal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ file:
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--.*harbor"
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 "^.\{5\}w.*harbor"
exit-status: 0
# 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
exit-status: 0
4 changes: 2 additions & 2 deletions .vib/harbor-registry/goss/harbor-registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ command:
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
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 "^.\{5\}w.*harbor"
exit-status: 0
4 changes: 2 additions & 2 deletions .vib/harbor-registryctl/goss/harbor-registryctl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ command:
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"
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 "^.\{5\}w.*harbor"
exit-status: 0
check-harbor-registryctl-binary:
exec: harbor_registryctl --help
exit-status: 0
exit-status: 0

0 comments on commit 285d5f8

Please sign in to comment.