[bitnami/valkey-sentinel] Update tests to check the master to primary change in the configuration (#74090)

* [bitnami/valkey-sentinel] Update tests to check the master to primary change in the configuration

Signed-off-by: Jota Martos <jotamartos@vmware.com>

* [bitnami/valkey-sentinel] Fix file path

Signed-off-by: Jota Martos <jotamartos@vmware.com>

* [bitnami/valkey-sentinel] Run test only for Valkey Sentinel 7.x

Signed-off-by: Jota Martos <jotamartos@vmware.com>

---------

Signed-off-by: Jota Martos <jotamartos@vmware.com>
This commit is contained in:
Juan José Martos
2024-11-04 17:06:38 +01:00
committed by GitHub
parent 5decd2aca1
commit 9aedb85450

View File

@@ -11,6 +11,13 @@ file:
- "daemonize no"
- 'logfile ""'
command:
# Remove if sentinel gets updated: https://github.com/valkey-io/valkey/blob/7.2/sentinel.conf
# Requires to update the libvalkeysentinel.sh script
{{ if regexMatch "^7.+" .Env.APP_VERSION }}
check-primary-master-change:
exec: if ! grep "SENTINEL master-reboot-down-after-period" /opt/bitnami/valkey-sentinel/etc/sentinel.conf; then exit 1; fi
exit-status: 0
{{ end }}
check-valkey-server:
exec: timeout --preserve-status 5 valkey-server /opt/bitnami/valkey-sentinel/etc/sentinel.conf --sentinel
exit-status: 0