Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F8391416
firewall_ports_spec.rb
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
firewall_ports_spec.rb
View Options
require
'spec_helper'
describe
'cassandra::firewall_ports'
do
let
(
:pre_condition
)
{
[
'class cassandra () {}'
,
'define firewall ($action, $port, $proto, $source) {}'
,
]
}
let!
(
:stdlib_stubs
)
{
MockFunction
.
new
(
'prefix'
)
{
|
f
|
f
.
stubbed
.
with
(
[
'0.0.0.0/0'
]
,
'200_Public_'
)
.
returns
(
'200_Public_0.0.0.0/0'
)
f
.
stubbed
.
with
(
[
'0.0.0.0/0'
]
,
'210_InterNode_'
)
.
returns
(
'210_InterNode__0.0.0.0/0'
)
f
.
stubbed
.
with
(
[
'0.0.0.0/0'
]
,
'220_Client_'
)
.
returns
(
'220_Client__0.0.0.0/0'
)
}
MockFunction
.
new
(
'concat'
)
{
|
f
|
f
.
stubbed
()
.
returns
(
[
8888
,
22
]
)
}
MockFunction
.
new
(
'size'
)
{
|
f
|
f
.
stubbed
()
.
returns
(
42
)
}
}
context
'Run with defaults.'
do
it
{
should
compile
}
it
{
should
contain_class
(
'cassandra::firewall_ports'
)
.
with
({
'client_subnets'
=>
[
'0.0.0.0/0'
]
,
'inter_node_subnets'
=>
[
'0.0.0.0/0'
]
,
'public_subnets'
=>
[
'0.0.0.0/0'
]
,
'ssh_port'
=>
22
,
'opscenter_subnets'
=>
[
'0.0.0.0/0'
]
})
}
it
{
should
contain_cassandra__firewall_ports__rule
(
'200_Public_0.0.0.0/0'
)
.
with
({
'ports'
=>
[
8888
,
22
]
})
}
end
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Jun 4 2025, 6:43 PM (14 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3398728
Attached To
R208 puppet-puppet-cassandra
Event Timeline
Log In to Comment