Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9125324
network_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
network_spec.rb
View Options
require
'spec_helper_acceptance'
broken
=
false
command
=
'docker'
network_name
=
'test-network'
if
os
[
:family
]
==
'windows'
puts
'Not implemented on Windows'
broken
=
true
elsif
os
[
:family
]
==
'RedHat'
docker_args
=
"repo_opt => '--enablerepo=localmirror-extras'"
elsif
os
[
:name
]
==
'Ubuntu'
&&
os
[
:release
][
:full
]
==
'14.04'
docker_args
=
"version => '18.06.1~ce~3-0~ubuntu'"
else
docker_args
=
''
end
describe
'docker network'
,
win_broken
:
broken
do
before
(
:all
)
do
install_pp
=
"class { 'docker':
#{
docker_args
}
}"
apply_manifest
(
install_pp
,
catch_failures
:
true
)
end
it
"
#{
command
}
network --help"
do
run_shell
(
"
#{
command
}
network --help"
,
expect_failures
:
false
)
end
context
'with a local bridge network described in Puppet'
do
after
(
:all
)
do
run_shell
(
"
#{
command
}
network rm
#{
network_name
}
"
)
end
it
'is idempotent'
do
pp
=
<<-
MANIFEST
docker_network { '#{network_name}':
ensure => present,
}
MANIFEST
idempotent_apply
(
pp
)
end
it
'has created a network'
do
run_shell
(
"
#{
command
}
network inspect
#{
network_name
}
"
,
expect_failures
:
false
)
end
end
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Sat, Jun 21, 8:30 PM (3 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3401554
Attached To
R205 puppet-puppetlabs-docker
Event Timeline
Log In to Comment