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 cd91071 commit 0fa6900
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 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).with('content' => %r{^#rdb-save-incremental-fsync yes$}) }
it { is_expected.to contain_file(config_file_orig).with('content' => %r{^#rdb-save-incremental-fsync yes}) }

Check failure on line 1690 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

redis on almalinux-8-x86_64 test rdb-save-incremental-fsync Undef is expected to contain File[/etc/redis.conf.puppet] with content =~ /^#rdb-save-incremental-fsync yes/ Failure/Error: it { is_expected.to contain_file(config_file_orig).with('content' => %r{^#rdb-save-incremental-fsync yes}) } Puppet::PreformattedError: Evaluation Error: Error while evaluating a Resource Statement, Class[Redis]: parameter 'rdb_save_incremental_fsync' expects a value of type Undef or Boolean, got String (line: 2, column: 1) on node fv-az1542-940.uwdtf5zkgycefedjt5dtsy0pzd.bx.internal.cloudapp.net

Check failure on line 1690 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

redis on almalinux-9-x86_64 test rdb-save-incremental-fsync Undef is expected to contain File[/etc/redis/redis.conf.puppet] with content =~ /^#rdb-save-incremental-fsync yes/ Failure/Error: it { is_expected.to contain_file(config_file_orig).with('content' => %r{^#rdb-save-incremental-fsync yes}) } Puppet::PreformattedError: Evaluation Error: Error while evaluating a Resource Statement, Class[Redis]: parameter 'rdb_save_incremental_fsync' expects a value of type Undef or Boolean, got String (line: 2, column: 1) on node fv-az1542-940.uwdtf5zkgycefedjt5dtsy0pzd.bx.internal.cloudapp.net

Check failure on line 1690 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

redis on centos-7-x86_64 test rdb-save-incremental-fsync Undef is expected to contain File[/etc/redis.conf.puppet] with content =~ /^#rdb-save-incremental-fsync yes/ Failure/Error: it { is_expected.to contain_file(config_file_orig).with('content' => %r{^#rdb-save-incremental-fsync yes}) } Puppet::PreformattedError: Evaluation Error: Error while evaluating a Resource Statement, Class[Redis]: parameter 'rdb_save_incremental_fsync' expects a value of type Undef or Boolean, got String (line: 2, column: 1) on node fv-az1542-940.uwdtf5zkgycefedjt5dtsy0pzd.bx.internal.cloudapp.net

Check failure on line 1690 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

redis on centos-8-x86_64 test rdb-save-incremental-fsync Undef is expected to contain File[/etc/redis.conf.puppet] with content =~ /^#rdb-save-incremental-fsync yes/ Failure/Error: it { is_expected.to contain_file(config_file_orig).with('content' => %r{^#rdb-save-incremental-fsync yes}) } Puppet::PreformattedError: Evaluation Error: Error while evaluating a Resource Statement, Class[Redis]: parameter 'rdb_save_incremental_fsync' expects a value of type Undef or Boolean, got String (line: 2, column: 1) on node fv-az1542-940.uwdtf5zkgycefedjt5dtsy0pzd.bx.internal.cloudapp.net

Check failure on line 1690 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

redis on centos-9-x86_64 test rdb-save-incremental-fsync Undef is expected to contain File[/etc/redis/redis.conf.puppet] with content =~ /^#rdb-save-incremental-fsync yes/ Failure/Error: it { is_expected.to contain_file(config_file_orig).with('content' => %r{^#rdb-save-incremental-fsync yes}) } Puppet::PreformattedError: Evaluation Error: Error while evaluating a Resource Statement, Class[Redis]: parameter 'rdb_save_incremental_fsync' expects a value of type Undef or Boolean, got String (line: 2, column: 1) on node fv-az1542-940.uwdtf5zkgycefedjt5dtsy0pzd.bx.internal.cloudapp.net

Check failure on line 1690 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

redis on debian-10-x86_64 test rdb-save-incremental-fsync Undef is expected to contain File[/etc/redis/redis.conf.puppet] with content =~ /^#rdb-save-incremental-fsync yes/ Failure/Error: it { is_expected.to contain_file(config_file_orig).with('content' => %r{^#rdb-save-incremental-fsync yes}) } Puppet::PreformattedError: Evaluation Error: Error while evaluating a Resource Statement, Class[Redis]: parameter 'rdb_save_incremental_fsync' expects a value of type Undef or Boolean, got String (line: 2, column: 1) on node fv-az1542-940.uwdtf5zkgycefedjt5dtsy0pzd.bx.internal.cloudapp.net

Check failure on line 1690 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

redis on debian-11-x86_64 test rdb-save-incremental-fsync Undef is expected to contain File[/etc/redis/redis.conf.puppet] with content =~ /^#rdb-save-incremental-fsync yes/ Failure/Error: it { is_expected.to contain_file(config_file_orig).with('content' => %r{^#rdb-save-incremental-fsync yes}) } Puppet::PreformattedError: Evaluation Error: Error while evaluating a Resource Statement, Class[Redis]: parameter 'rdb_save_incremental_fsync' expects a value of type Undef or Boolean, got String (line: 2, column: 1) on node fv-az1542-940.uwdtf5zkgycefedjt5dtsy0pzd.bx.internal.cloudapp.net

Check failure on line 1690 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

redis on redhat-7-x86_64 test rdb-save-incremental-fsync Undef is expected to contain File[/etc/redis.conf.puppet] with content =~ /^#rdb-save-incremental-fsync yes/ Failure/Error: it { is_expected.to contain_file(config_file_orig).with('content' => %r{^#rdb-save-incremental-fsync yes}) } Puppet::PreformattedError: Evaluation Error: Error while evaluating a Resource Statement, Class[Redis]: parameter 'rdb_save_incremental_fsync' expects a value of type Undef or Boolean, got String (line: 2, column: 1) on node fv-az1542-940.uwdtf5zkgycefedjt5dtsy0pzd.bx.internal.cloudapp.net

Check failure on line 1690 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

redis on redhat-8-x86_64 test rdb-save-incremental-fsync Undef is expected to contain File[/etc/redis.conf.puppet] with content =~ /^#rdb-save-incremental-fsync yes/ Failure/Error: it { is_expected.to contain_file(config_file_orig).with('content' => %r{^#rdb-save-incremental-fsync yes}) } Puppet::PreformattedError: Evaluation Error: Error while evaluating a Resource Statement, Class[Redis]: parameter 'rdb_save_incremental_fsync' expects a value of type Undef or Boolean, got String (line: 2, column: 1) on node fv-az1542-940.uwdtf5zkgycefedjt5dtsy0pzd.bx.internal.cloudapp.net

Check failure on line 1690 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

redis on redhat-9-x86_64 test rdb-save-incremental-fsync Undef is expected to contain File[/etc/redis/redis.conf.puppet] with content =~ /^#rdb-save-incremental-fsync yes/ Failure/Error: it { is_expected.to contain_file(config_file_orig).with('content' => %r{^#rdb-save-incremental-fsync yes}) } Puppet::PreformattedError: Evaluation Error: Error while evaluating a Resource Statement, Class[Redis]: parameter 'rdb_save_incremental_fsync' expects a value of type Undef or Boolean, got String (line: 2, column: 1) on node fv-az1542-940.uwdtf5zkgycefedjt5dtsy0pzd.bx.internal.cloudapp.net

Check failure on line 1690 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

redis on centos-7-x86_64 test rdb-save-incremental-fsync Undef is expected to contain File[/etc/redis.conf.puppet] with content =~ /^#rdb-save-incremental-fsync yes/ Failure/Error: it { is_expected.to contain_file(config_file_orig).with('content' => %r{^#rdb-save-incremental-fsync yes}) } Puppet::PreformattedError: Evaluation Error: Error while evaluating a Resource Statement, Class[Redis]: parameter 'rdb_save_incremental_fsync' expects a value of type Undef or Boolean, got String (line: 2, column: 1) on node fv-az1116-853.iopidld3wkhelkdxw22dv3nexc.bx.internal.cloudapp.net

Check failure on line 1690 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

redis on ubuntu-20.04-x86_64 test rdb-save-incremental-fsync Undef is expected to contain File[/etc/redis/redis.conf.puppet] with content =~ /^#rdb-save-incremental-fsync yes/ Failure/Error: it { is_expected.to contain_file(config_file_orig).with('content' => %r{^#rdb-save-incremental-fsync yes}) } Puppet::PreformattedError: Evaluation Error: Error while evaluating a Resource Statement, Class[Redis]: parameter 'rdb_save_incremental_fsync' expects a value of type Undef or Boolean, got String (line: 2, column: 1) on node fv-az1116-853.iopidld3wkhelkdxw22dv3nexc.bx.internal.cloudapp.net

Check failure on line 1690 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

redis on centos-9-x86_64 test rdb-save-incremental-fsync Undef is expected to contain File[/etc/redis/redis.conf.puppet] with content =~ /^#rdb-save-incremental-fsync yes/ Failure/Error: it { is_expected.to contain_file(config_file_orig).with('content' => %r{^#rdb-save-incremental-fsync yes}) } Puppet::PreformattedError: Evaluation Error: Error while evaluating a Resource Statement, Class[Redis]: parameter 'rdb_save_incremental_fsync' expects a value of type Undef or Boolean, got String (line: 2, column: 1) on node fv-az1116-853.iopidld3wkhelkdxw22dv3nexc.bx.internal.cloudapp.net

Check failure on line 1690 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

redis on rocky-9-x86_64 test rdb-save-incremental-fsync Undef is expected to contain File[/etc/redis/redis.conf.puppet] with content =~ /^#rdb-save-incremental-fsync yes/ Failure/Error: it { is_expected.to contain_file(config_file_orig).with('content' => %r{^#rdb-save-incremental-fsync yes}) } Puppet::PreformattedError: Evaluation Error: Error while evaluating a Resource Statement, Class[Redis]: parameter 'rdb_save_incremental_fsync' expects a value of type Undef or Boolean, got String (line: 2, column: 1) on node fv-az1116-853.iopidld3wkhelkdxw22dv3nexc.bx.internal.cloudapp.net

Check failure on line 1690 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

redis on centos-8-x86_64 test rdb-save-incremental-fsync Undef is expected to contain File[/etc/redis.conf.puppet] with content =~ /^#rdb-save-incremental-fsync yes/ Failure/Error: it { is_expected.to contain_file(config_file_orig).with('content' => %r{^#rdb-save-incremental-fsync yes}) } Puppet::PreformattedError: Evaluation Error: Error while evaluating a Resource Statement, Class[Redis]: parameter 'rdb_save_incremental_fsync' expects a value of type Undef or Boolean, got String (line: 2, column: 1) on node fv-az1116-853.iopidld3wkhelkdxw22dv3nexc.bx.internal.cloudapp.net

Check failure on line 1690 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

redis on redhat-9-x86_64 test rdb-save-incremental-fsync Undef is expected to contain File[/etc/redis/redis.conf.puppet] with content =~ /^#rdb-save-incremental-fsync yes/ Failure/Error: it { is_expected.to contain_file(config_file_orig).with('content' => %r{^#rdb-save-incremental-fsync yes}) } Puppet::PreformattedError: Evaluation Error: Error while evaluating a Resource Statement, Class[Redis]: parameter 'rdb_save_incremental_fsync' expects a value of type Undef or Boolean, got String (line: 2, column: 1) on node fv-az1116-853.iopidld3wkhelkdxw22dv3nexc.bx.internal.cloudapp.net

Check failure on line 1690 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

redis on redhat-8-x86_64 test rdb-save-incremental-fsync Undef is expected to contain File[/etc/redis.conf.puppet] with content =~ /^#rdb-save-incremental-fsync yes/ Failure/Error: it { is_expected.to contain_file(config_file_orig).with('content' => %r{^#rdb-save-incremental-fsync yes}) } Puppet::PreformattedError: Evaluation Error: Error while evaluating a Resource Statement, Class[Redis]: parameter 'rdb_save_incremental_fsync' expects a value of type Undef or Boolean, got String (line: 2, column: 1) on node fv-az1116-853.iopidld3wkhelkdxw22dv3nexc.bx.internal.cloudapp.net

Check failure on line 1690 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

redis on rocky-8-x86_64 test rdb-save-incremental-fsync Undef is expected to contain File[/etc/redis.conf.puppet] with content =~ /^#rdb-save-incremental-fsync yes/ Failure/Error: it { is_expected.to contain_file(config_file_orig).with('content' => %r{^#rdb-save-incremental-fsync yes}) } Puppet::PreformattedError: Evaluation Error: Error while evaluating a Resource Statement, Class[Redis]: parameter 'rdb_save_incremental_fsync' expects a value of type Undef or Boolean, got String (line: 2, column: 1) on node fv-az1116-853.iopidld3wkhelkdxw22dv3nexc.bx.internal.cloudapp.net

Check failure on line 1690 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

redis on debian-10-x86_64 test rdb-save-incremental-fsync Undef is expected to contain File[/etc/redis/redis.conf.puppet] with content =~ /^#rdb-save-incremental-fsync yes/ Failure/Error: it { is_expected.to contain_file(config_file_orig).with('content' => %r{^#rdb-save-incremental-fsync yes}) } Puppet::PreformattedError: Evaluation Error: Error while evaluating a Resource Statement, Class[Redis]: parameter 'rdb_save_incremental_fsync' expects a value of type Undef or Boolean, got String (line: 2, column: 1) on node fv-az1116-853.iopidld3wkhelkdxw22dv3nexc.bx.internal.cloudapp.net
end

describe 'test rdb-save-incremental-fsync enabled' do
Expand Down
3 changes: 2 additions & 1 deletion templates/redis.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,8 @@ 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.
<% if $rdb_save_incremental_fsync == undef { %>#rdb-save-incremental-fsync yes
<% if $rdb_save_incremental_fsync == undef { %>
#rdb-save-incremental-fsync yes
<% } else { %>
rdb-save-incremental-fsync <%= bool2str($rdb_save_incremental_fsync, 'yes', 'no') %>
<% } %>
Expand Down

0 comments on commit 0fa6900

Please sign in to comment.