[bitnami/aspnet-core] Add VIB tests (#23939)

* [bitnami/aspnet-core] Add VIB tests

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Remove aspnet-core/templates folder

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Remove VIB trigger

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Improve runtimes check

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Use refactored common tests and trigger VIB

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Remove VIB trigger

Signed-off-by: FraPazGal <fdepaz@vmware.com>

---------

Signed-off-by: FraPazGal <fdepaz@vmware.com>
This commit is contained in:
Francisco de Paz Galan
2023-02-16 13:07:23 +01:00
committed by GitHub
parent dacc15303e
commit 647e8364c7
5 changed files with 75 additions and 3 deletions

View File

@@ -0,0 +1,18 @@
command:
check-bin-caps:
exec: getcap {{ .Vars.root_dir }}/aspnet-core/bin/dotnet
stdout:
- {{ .Vars.binary.capabilities }}
exit-status: 0
check-installed-runtimes:
exec: dotnet --list-runtimes
stdout:
- AspNetCore.App {{ .Env.APP_VERSION }}
- NETCore.App {{ .Env.APP_VERSION }}
exit-status: 0
file:
# Checks the postunpack phase properly creates the lib's symlink
/lib64/libz.so:
exists: true
filetype: symlink
linked-to: /usr/lib/libz.so.1

View File

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

View File

@@ -0,0 +1,15 @@
binaries:
- dotnet
directories:
- paths:
- /app
mode: "0775"
- paths:
- /opt/bitnami/aspnet-core/bin/host
- /opt/bitnami/aspnet-core/bin/shared
root_dir: /opt/bitnami
version:
bin_name: dotnet
flag: --info
binary:
capabilities: cap_net_bind_service=eip

View File

@@ -3,7 +3,8 @@
"resources": {
"url": "{VIB_ENV_CONTAINER_URL}",
"path": "{VIB_ENV_PATH}"
}
},
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
},
"phases": {
"package": {
@@ -32,6 +33,19 @@
},
"verify": {
"actions": [
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "aspnet-core/goss/goss.yaml",
"vars_file": "aspnet-core/goss/vars.yaml",
"remote": {
"workload": "deploy-aspnet-core"
}
}
},
{
"action_id": "trivy",
"params": {

View File

@@ -3,7 +3,8 @@
"resources": {
"url": "{SHA_ARCHIVE}",
"path": "{VIB_ENV_PATH}"
}
},
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
},
"phases": {
"package": {
@@ -29,6 +30,19 @@
},
"verify": {
"actions": [
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "aspnet-core/goss/goss.yaml",
"vars_file": "aspnet-core/goss/vars.yaml",
"remote": {
"workload": "deploy-aspnet-core"
}
}
},
{
"action_id": "trivy",
"params": {
@@ -50,4 +64,4 @@
]
}
}
}
}