Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9124104
network_spec.rb
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
886 B
Subscribers
None
network_spec.rb
View Options
require
'spec_helper_acceptance'
describe
'docker network'
do
command
=
'docker'
before
(
:all
)
do
install_code
=
"class { 'docker': }"
apply_manifest
(
install_code
,
:catch_failures
=>
true
)
end
describe
command
(
"
#{
command
}
network --help"
)
do
its
(
:exit_status
)
{
should
eq
0
}
end
context
'with a local bridge network described in Puppet'
do
before
(
:all
)
do
@name
=
'test-network'
@pp
=
<<-
code
docker_network { '#{@name}':
ensure => present,
}
code
apply_manifest
(
@pp
,
:catch_failures
=>
true
)
end
it
'should be idempotent'
do
apply_manifest
(
@pp
,
:catch_changes
=>
true
)
end
it
'should have created a network'
do
shell
(
"
#{
command
}
network inspect
#{
@name
}
"
,
:acceptable_exit_codes
=>
[
0
]
)
end
after
(
:all
)
do
shell
(
"
#{
command
}
network rm
#{
@name
}
"
)
end
end
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Sat, Jun 21, 6:41 PM (2 w, 5 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3398920
Attached To
R205 puppet-puppetlabs-docker
Event Timeline
Log In to Comment