Skip to content

Commit

Permalink
easier to test for a commented-out line
Browse files Browse the repository at this point in the history
  • Loading branch information
thejambavan committed Nov 16, 2023
1 parent 52fe4a7 commit 2fe204b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion spec/classes/redis_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1687,7 +1687,7 @@ class { 'redis':
}
end

it { is_expected.to contain_file(config_file_orig).without('content' => %r{^rdb-save-incremental-fsync.*$}) }
it { is_expected.to contain_file(config_file_orig).with('content' => %r{^#rdb-save-incremental-fsync yes$}) }
end

describe 'test rdb-save-incremental-fsync enabled' do
Expand Down
4 changes: 2 additions & 2 deletions templates/redis.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -1030,9 +1030,9 @@ aof-rewrite-incremental-fsync <%= bool2str($aof_rewrite_incremental_fsync, 'yes'
# the file will be fsync-ed every 32 MB of data generated. This is useful
# in order to commit the file to the disk more incrementally and avoid
# big latency spikes.
<% unless $rdb_save_incremental_fsync == undef { -%>
<% if $ rdb_save_incremental_fsync == undef { %>#rdb-save-incremental-fsync yes<% } else { %>
rdb-save-incremental-fsync <%= bool2str($rdb_save_incremental_fsync, 'yes', 'no') %>
<% } -%>
<% } %>

# Redis Cluster Settings
<% if $cluster_enabled { -%>
Expand Down

0 comments on commit 2fe204b

Please sign in to comment.