Skip to content

Commit

Permalink
#193 [tests] add failing unit test for action + type
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Magistro <koncept1@gmail.com>
  • Loading branch information
Ben Magistro authored and jcpunk committed Aug 24, 2023
1 parent bd3133b commit 3e06371
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion spec/unit/puppet/type/firewalld_rich_rule_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,31 @@
icmp_type: 'echo',
log: { 'level' => 'debug' },
action: 'accept'
} => 'rule family="ipv4" destination address="10.0.1.2/24" icmp-type name="echo" log level="debug" accept'
} => 'rule family="ipv4" destination address="10.0.1.2/24" icmp-type name="echo" log level="debug" accept',

## test reject
{
name: 'reject ssh',
ensure: 'present',
family: 'ipv4',
zone: 'restricted',
source: { 'address' => '10.0.1.2/24' },
service: 'ssh',
log: { 'level' => 'debug' },
action: 'reject'
} => 'rule family="ipv4" source address="10.0.1.2/24" service name="ssh" log level="debug" reject',

## test reject + type (#193)
{
name: 'reject ssh tcp reset',
ensure: 'present',
family: 'ipv4',
zone: 'restricted',
source: { 'address' => '10.0.1.2/24' },
service: 'ssh',
log: { 'level' => 'debug' },
action: { 'action' => 'reject', 'type' => 'tcp-reset' }
} => 'rule family="ipv4" source address="10.0.1.2/24" service name="ssh" log level="debug" reject type="tcp-reset"',

}

Expand Down

0 comments on commit 3e06371

Please sign in to comment.