diff --git a/.vib/couchdb/goss/couchdb.yaml b/.vib/couchdb/goss/couchdb.yaml new file mode 100644 index 000000000000..7d19f48f0848 --- /dev/null +++ b/.vib/couchdb/goss/couchdb.yaml @@ -0,0 +1,16 @@ +file: + # Checks default config for erlang is set + /opt/bitnami/couchdb/etc/vm.args: + exists: true + filetype: file + contains: + - /-kernel.*inet_dist_listen_min.*9100/ +command: + check-library-path: + exec: echo $LD_LIBRARY_PATH + stdout: + - /opt/bitnami/common/lib + exit-status: 0 + check-libmozjs: + exec: ls /opt/bitnami/common/lib | grep libmozjs + exit-status: 0 diff --git a/.vib/couchdb/goss/goss.yaml b/.vib/couchdb/goss/goss.yaml new file mode 100644 index 000000000000..dc7624cfa21b --- /dev/null +++ b/.vib/couchdb/goss/goss.yaml @@ -0,0 +1,12 @@ +gossfile: + # Goss tests exclusive to the current container + ../../couchdb/goss/couchdb.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: {} diff --git a/.vib/couchdb/goss/vars.yaml b/.vib/couchdb/goss/vars.yaml new file mode 100644 index 000000000000..d6be53921ef5 --- /dev/null +++ b/.vib/couchdb/goss/vars.yaml @@ -0,0 +1,19 @@ +binaries: + - couchdb + - couchjs + - erl + - gosu + - ini-file + - wait-for-port +directories: + - mode: "0775" + paths: + - /bitnami/couchdb/data + - /opt/bitnami/couchdb/etc + - paths: + - /opt/bitnami/couchdb/etc/default.d + - /opt/bitnami/common/lib +root_dir: /opt/bitnami +version: + bin_name: couchjs + flag: -V diff --git a/.vib/couchdb/vib-publish.json b/.vib/couchdb/vib-publish.json index b95e5f947244..00ff31388dfa 100644 --- a/.vib/couchdb/vib-publish.json +++ b/.vib/couchdb/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": "couchdb/goss/goss.yaml", + "vars_file": "couchdb/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-couchdb" + } + } + } + }, { "action_id": "trivy", "params": { diff --git a/.vib/couchdb/vib-verify.json b/.vib/couchdb/vib-verify.json index 835cd556e241..c9c8ac44dada 100644 --- a/.vib/couchdb/vib-verify.json +++ b/.vib/couchdb/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": "couchdb/goss/goss.yaml", + "vars_file": "couchdb/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-couchdb" + } + } + } + }, { "action_id": "trivy", "params": { @@ -50,4 +66,4 @@ ] } } -} \ No newline at end of file +}