From 000d5193af41e33dbdcc5a3940245293c21bad36 Mon Sep 17 00:00:00 2001 From: Alexander Fisher Date: Mon, 11 Mar 2019 16:19:45 +0000 Subject: [PATCH] Specify custom pidfile when testing sentinel on 16.04 --- .../suites/default/redis_sentinel_one_node_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/acceptance/suites/default/redis_sentinel_one_node_spec.rb b/spec/acceptance/suites/default/redis_sentinel_one_node_spec.rb index ec39e812..7f25caec 100644 --- a/spec/acceptance/suites/default/redis_sentinel_one_node_spec.rb +++ b/spec/acceptance/suites/default/redis_sentinel_one_node_spec.rb @@ -16,6 +16,13 @@ $redis_master = '127.0.0.1' $failover_timeout = '10000' + # We're testing with `manage_repo` true. In redis-sentinel 5, the daemon has its own rundir + if $::operatingsystem == 'Ubuntu' && $::operatingsystemmajrelease == '16.04' { + $pidfile = '/var/run/sentinel/redis-sentinel.pid' + } else { + $pidfile = undef + } + class { 'redis': manage_repo => true, } @@ -24,6 +31,7 @@ class { 'redis::sentinel': master_name => $master_name, redis_host => $redis_master, failover_timeout => $failover_timeout, + pid_file => $pidfile, } EOS