From 9aedb85450ab2c69966174210b321bdc191a213c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Jos=C3=A9=20Martos?= Date: Mon, 4 Nov 2024 17:06:38 +0100 Subject: [PATCH] [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 * [bitnami/valkey-sentinel] Fix file path Signed-off-by: Jota Martos * [bitnami/valkey-sentinel] Run test only for Valkey Sentinel 7.x Signed-off-by: Jota Martos --------- Signed-off-by: Jota Martos --- .vib/valkey-sentinel/goss/valkey-sentinel.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.vib/valkey-sentinel/goss/valkey-sentinel.yaml b/.vib/valkey-sentinel/goss/valkey-sentinel.yaml index 5a2ecc6bb136..668e92eddca0 100644 --- a/.vib/valkey-sentinel/goss/valkey-sentinel.yaml +++ b/.vib/valkey-sentinel/goss/valkey-sentinel.yaml @@ -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