diff --git a/.vib/haproxy/goss/goss.yaml b/.vib/haproxy/goss/goss.yaml new file mode 100644 index 000000000000..a512396c2280 --- /dev/null +++ b/.vib/haproxy/goss/goss.yaml @@ -0,0 +1,11 @@ +gossfile: + # Goss tests exclusive to the current container + ../../haproxy/goss/haproxy.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: {} diff --git a/.vib/haproxy/goss/haproxy.yaml b/.vib/haproxy/goss/haproxy.yaml new file mode 100644 index 000000000000..dd40e9a0ab4f --- /dev/null +++ b/.vib/haproxy/goss/haproxy.yaml @@ -0,0 +1,8 @@ +command: + # HAProxy should have been compiled with Lua and Prometheus support + check-lua-promex-support: + exec: haproxy -vv + exit-status: 0 + stdout: + - Built with Lua + - Built with the Prometheus \ No newline at end of file diff --git a/.vib/haproxy/goss/vars.yaml b/.vib/haproxy/goss/vars.yaml new file mode 100644 index 000000000000..6c6b7f86ffb0 --- /dev/null +++ b/.vib/haproxy/goss/vars.yaml @@ -0,0 +1,8 @@ +binaries: + - haproxy + - dataplaneapi + - lua +root_dir: /opt/bitnami +version: + bin_name: haproxy + flag: -v \ No newline at end of file diff --git a/.vib/haproxy/vib-publish.json b/.vib/haproxy/vib-publish.json index 8b6fe8eab4e6..ac60c6048d37 100644 --- a/.vib/haproxy/vib-publish.json +++ b/.vib/haproxy/vib-publish.json @@ -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": "haproxy/goss/goss.yaml", + "vars_file": "haproxy/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-haproxy" + } + } + } + }, { "action_id": "trivy", "params": { diff --git a/.vib/haproxy/vib-verify.json b/.vib/haproxy/vib-verify.json index a34e8aee9161..11e08d7196f9 100644 --- a/.vib/haproxy/vib-verify.json +++ b/.vib/haproxy/vib-verify.json @@ -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": "haproxy/goss/goss.yaml", + "vars_file": "haproxy/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-haproxy" + } + } + } + }, { "action_id": "trivy", "params": {