mirror of
https://github.com/bitnami/charts.git
synced 2026-02-28 15:37:42 +08:00
[bitnami/memcached] Add Helm Chart tests (#11808)
* [bitnami/memcached] Add Helm Chart tests Signed-off-by: FraPazGal <fdepaz@vmware.com> * Add chart to CD Signed-off-by: FraPazGal <fdepaz@vmware.com> * Remove redundant test and add id one Signed-off-by: FraPazGal <fdepaz@vmware.com> * Refactor manage-key test Signed-off-by: FraPazGal <fdepaz@vmware.com> * Remove unused param Signed-off-by: FraPazGal <fdepaz@vmware.com> Signed-off-by: FraPazGal <fdepaz@vmware.com>
This commit is contained in:
committed by
GitHub
parent
06347b57ad
commit
533bf6b2e7
1
.github/workflows/cd-pipeline.yaml
vendored
1
.github/workflows/cd-pipeline.yaml
vendored
@@ -26,6 +26,7 @@ on: # rebuild any PRs and main branch changes
|
||||
- 'bitnami/mariadb/**'
|
||||
- 'bitnami/matomo/**'
|
||||
- 'bitnami/mediawiki/**'
|
||||
- 'bitnami/memcached/**'
|
||||
- 'bitnami/minio/**'
|
||||
- 'bitnami/mongodb/**'
|
||||
- 'bitnami/mysql/**'
|
||||
|
||||
21
.vib/memcached/goss/goss.yaml
Normal file
21
.vib/memcached/goss/goss.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
file:
|
||||
/tmp:
|
||||
mode: "2777"
|
||||
filetype: directory
|
||||
exists: true
|
||||
command:
|
||||
{{- $key := printf "key_%s" (randAlpha 5) }}
|
||||
{{- $value := printf "value_%s" (randAlpha 5) }}
|
||||
{{- $server_connection := printf "(exec 3<>/dev/tcp/memcached/%s; cat >&3; cat <&3; exec 3<&-)" .Vars.service.ports.memcached }}
|
||||
manage-key:
|
||||
exec: bash -c 'printf "set {{ $key }} 0 300 11\r\n{{ $value }}\r\nquit\n" | {{ $server_connection }} && printf "get {{ $key }}\r\nquit\n" | {{ $server_connection }}'
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- STORED
|
||||
- {{ $value }}
|
||||
check-user-info:
|
||||
exec: id
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- uid={{ .Vars.containerSecurityContext.runAsUser }}
|
||||
- /groups=.*{{ .Vars.podSecurityContext.fsGroup }}/
|
||||
7
.vib/memcached/goss/vars.yaml
Normal file
7
.vib/memcached/goss/vars.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
service:
|
||||
ports:
|
||||
memcached: "80"
|
||||
podSecurityContext:
|
||||
fsGroup: 1002
|
||||
containerSecurityContext:
|
||||
runAsUser: 1002
|
||||
@@ -16,6 +16,42 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"verify": {
|
||||
"context": {
|
||||
"resources": {
|
||||
"url": "{SHA_ARCHIVE}",
|
||||
"path": "/bitnami/memcached"
|
||||
},
|
||||
"runtime_parameters": "c2VydmljZToKICB0eXBlOiBMb2FkQmFsYW5jZXIKICBwb3J0czoKICAgIG1lbWNhY2hlZDogODAKcG9kU2VjdXJpdHlDb250ZXh0OgogIGVuYWJsZWQ6IHRydWUKICBmc0dyb3VwOiAxMDAyCmNvbnRhaW5lclNlY3VyaXR5Q29udGV4dDoKICBlbmFibGVkOiB0cnVlCiAgcnVuQXNVc2VyOiAxMDAyCmNvbnRhaW5lclBvcnRzOgogIG1lbWNhY2hlZDogMTEyMTE=",
|
||||
"target_platform": {
|
||||
"target_platform_id": "{VIB_ENV_ALTERNATIVE_TARGET_PLATFORM}",
|
||||
"size": {
|
||||
"name": "S4"
|
||||
}
|
||||
}
|
||||
},
|
||||
"actions": [
|
||||
{
|
||||
"action_id": "health-check",
|
||||
"params": {
|
||||
"endpoint": "lb-memcached-memcache",
|
||||
"app_protocol": "GENERIC"
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "goss",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib/memcached/goss"
|
||||
},
|
||||
"remote": {
|
||||
"workload": "deploy-memcached"
|
||||
},
|
||||
"vars_file": "vars.yaml"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"publish": {
|
||||
"actions": [
|
||||
{
|
||||
|
||||
@@ -15,6 +15,42 @@
|
||||
"action_id": "helm-lint"
|
||||
}
|
||||
]
|
||||
},
|
||||
"verify": {
|
||||
"context": {
|
||||
"resources": {
|
||||
"url": "{SHA_ARCHIVE}",
|
||||
"path": "/bitnami/memcached"
|
||||
},
|
||||
"runtime_parameters": "c2VydmljZToKICB0eXBlOiBMb2FkQmFsYW5jZXIKICBwb3J0czoKICAgIG1lbWNhY2hlZDogODAKcG9kU2VjdXJpdHlDb250ZXh0OgogIGVuYWJsZWQ6IHRydWUKICBmc0dyb3VwOiAxMDAyCmNvbnRhaW5lclNlY3VyaXR5Q29udGV4dDoKICBlbmFibGVkOiB0cnVlCiAgcnVuQXNVc2VyOiAxMDAyCmNvbnRhaW5lclBvcnRzOgogIG1lbWNhY2hlZDogMTEyMTE=",
|
||||
"target_platform": {
|
||||
"target_platform_id": "{VIB_ENV_ALTERNATIVE_TARGET_PLATFORM}",
|
||||
"size": {
|
||||
"name": "S4"
|
||||
}
|
||||
}
|
||||
},
|
||||
"actions": [
|
||||
{
|
||||
"action_id": "health-check",
|
||||
"params": {
|
||||
"endpoint": "lb-memcached-memcache",
|
||||
"app_protocol": "GENERIC"
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "goss",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib/memcached/goss"
|
||||
},
|
||||
"remote": {
|
||||
"workload": "deploy-memcached"
|
||||
},
|
||||
"vars_file": "vars.yaml"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user