[bitnami/flink] Add VIB tests (#34939)

* [bitnami/flink] Add VIB tests

Signed-off-by: Andrés Bono <andresbono@vmware.com>

* Update .vib/flink/goss/flink.yaml

Co-authored-by: Miguel Ruiz <miruiz@vmware.com>
Signed-off-by: Andrés Bono <andresbono@vmware.com>

---------

Signed-off-by: Andrés Bono <andresbono@vmware.com>
Co-authored-by: Miguel Ruiz <miruiz@vmware.com>
This commit is contained in:
Andrés Bono
2023-05-29 10:42:56 +02:00
committed by GitHub
parent 1b6514c769
commit e310f28c3e
5 changed files with 87 additions and 2 deletions

View File

@@ -0,0 +1,24 @@
command:
check-flink-jobmanager-run:
exec: timeout --preserve-status 5 jobmanager.sh start-foreground
timeout: 8000
exit-status: 143
stdout:
- Rest endpoint listening
- Web frontend listening
file:
/opt/bitnami/flink/plugins/s3-fs-base/flink-s3-fs-base-{{ .Env.APP_VERSION }}.jar:
exists: true
filetype: file
/opt/bitnami/flink/plugins/s3-fs-presto/flink-s3-fs-presto-{{ .Env.APP_VERSION }}.jar:
exists: true
filetype: file
/opt/bitnami/flink/plugins/s3-fs-hadoop/flink-s3-fs-hadoop-{{ .Env.APP_VERSION }}.jar:
exists: true
filetype: file
user:
flink:
exists: true
group:
flink:
exists: true

12
.vib/flink/goss/goss.yaml Normal file
View File

@@ -0,0 +1,12 @@
gossfile:
# Goss tests exclusive to the current container
../../flink/goss/flink.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: {}

17
.vib/flink/goss/vars.yaml Normal file
View File

@@ -0,0 +1,17 @@
binaries:
- flink
- java
directories:
- mode: "0775"
paths:
- /bitnami/flink
- /opt/bitnami/flink
- /opt/bitnami/flink/conf
- /opt/bitnami/flink/bin
root_dir: /opt/bitnami
version:
bin_name: flink
flag: -v
sed_in_place:
exclude_paths:
- /opt/bitnami/flink/plugins

View File

@@ -3,7 +3,8 @@
"resources": {
"url": "{VIB_ENV_CONTAINER_URL}",
"path": "{VIB_ENV_PATH}"
}
},
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
},
"phases": {
"package": {
@@ -82,6 +83,21 @@
}
}
}
},
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "flink/goss/goss.yaml",
"vars_file": "flink/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-flink"
}
}
}
}
]
},

View File

@@ -3,7 +3,8 @@
"resources": {
"url": "{SHA_ARCHIVE}",
"path": "{VIB_ENV_PATH}"
}
},
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
},
"phases": {
"package": {
@@ -46,6 +47,21 @@
"OS"
]
}
},
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "flink/goss/goss.yaml",
"vars_file": "flink/goss/vars.yaml",
"remote": {
"pod": {
"workload": "deploy-flink"
}
}
}
}
]
}