Skip to content

Commit

Permalink
Add spec test for extra network sections
Browse files Browse the repository at this point in the history
  • Loading branch information
sallchr committed Jul 25, 2024
1 parent ed12b07 commit 4d43272
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/defines/interface_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@
it { is_expected.not_to compile.with_all_deps }
end

context 'with required params (peers), routes and without firewall rules' do
context 'with required params (peers), routes, extra network sections and without firewall rules' do
let :params do
{
peers: [
Expand All @@ -276,6 +276,7 @@
destination_addresses: [facts[:networking]['ip'],],
addresses: [{ 'Address' => '192.0.2.1/24' }],
routes: [{ 'Gateway' => '192.0.2.2', 'GatewayOnLink' => true, 'Destination' => '192.0.3.0/24' }],
extra_networkd_sections: [{ 'RoutingPolicyRule' => [{ 'From' => '10.0.0.0/24', 'Table' => '1010', 'IncomingInterface' => 'as1234' }]}],

Check failure on line 279 in spec/defines/interface_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Layout/SpaceInsideHashLiteralBraces: Space inside } missing. (https://rubystyle.guide#spaces-braces)
}
end

Expand Down
5 changes: 5 additions & 0 deletions spec/fixtures/test_files/peers_routes.network
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,8 @@ Gateway=192.0.2.2
GatewayOnLink=true
Destination=192.0.3.0/24

[RoutingPolicyRule]
From=10.0.0.0/24
Table=1010
IncomingInterface=as1234

0 comments on commit 4d43272

Please sign in to comment.