voxpupuli / puppet-redis

Puppet Module to manage Redis
https://forge.puppet.com/puppet/redis
Apache License 2.0
40 stars 183 forks source link

Rdb save incremental fsync #495

Open thejambavan opened 10 months ago

thejambavan commented 10 months ago

Pull Request (PR) description

minor change to the redis.conf EPP template to make it possible to disable rdb_save_incremental_fsync

This Pull Request (PR) fixes the following issues

Fixes #494

thejambavan commented 10 months ago

I have corrected the if to an unless Undef and have added tests which seem to do the job (apologies for multiple formatting commits) for all three states:

Undef: no config file entry, aka "the default" which may have been "no" in the past but is now "yes" true: yes false: no

I have separately verified that this works as intended on a real-world instance.

edit: i clearly do not now how to use rspec properly

thejambavan commented 10 months ago

no matter what i do with the test, when i set:

            rdb_save_incremental_fsync: nil,

as part of the rspec test, i can't get the test to pass in the Puppet/ruby stages. I don't see any other tests for undef/nil, and have not had any luck finding good examples elsewhere.