Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
canihavethisone committed Aug 3, 2024
1 parent c6941cf commit 0b2ccdd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,12 @@
exec { 'nftables_running_state_check':
command => 'echo "reloading nftables"',
path => ['/usr/sbin', '/sbin', '/usr/bin', '/bin'],
unless => "/usr/bin/test -s /var/tmp/nftables_hash -a \"$(nft -s list ruleset | sha1sum)\" = \"$(cat ${inmem_rules_hash_file})\"",
unless => "/usr/bin/test -s ${inmem_rules_hash_file} -a \"$(nft -s list ruleset | sha1sum)\" = \"$(cat ${inmem_rules_hash_file})\"",
notify => Service['nftables'],
}

# Generate nftables_hash upon any changes from the nftables service
exec { 'generate_nftables_hash':
exec { 'nftables_generate_hash':
command => "nft -s list ruleset | sha1sum > ${inmem_rules_hash_file}",
path => ['/usr/sbin', '/sbin', '/usr/bin', '/bin'],
subscribe => Service['nftables'],
Expand Down
6 changes: 3 additions & 3 deletions spec/classes/nftables_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
}

it {
expect(subject).not_to contain_exec('generate_ntfables_hash')
expect(subject).not_to contain_exec('nftables_generate_hash')
}

it {
Expand Down Expand Up @@ -323,11 +323,11 @@
is_expected.to contain_exec('nftables_running_state_check').with(
command: %r{^echo "reloading nftables"$},
notify: 'Service[nftables]',
unless: %r{^/usr/bin/test -s /var/tmp/nftables_hash -a "\$\(nft -s list ruleset \| sha1sum\)" = "\$\(cat /foo/bar\)"$}
unless: %r{^/usr/bin/test -s /foo/bar -a "\$\(nft -s list ruleset \| sha1sum\)" = "\$\(cat /foo/bar\)"$}
)
}
it {
is_expected.to contain_exec('generate_nftables_hash').with(
is_expected.to contain_exec('nftables_generate_hash').with(
command: %r{^nft -s list ruleset \| sha1sum > /foo/bar$},
subscribe: 'Service[nftables]',
refreshonly: true,
Expand Down

0 comments on commit 0b2ccdd

Please sign in to comment.