Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9124709
machine_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
machine_spec.rb
View Options
require
'spec_helper'
tests
=
{
'with default value'
=>
{
},
}
describe
'docker::machine'
,
type
:
:class
do
on_supported_os
.
each
do
|
os
,
os_facts
|
##
## set some needed facts
##
facts
=
if
os
=~
%r{windows}
windows_facts
.
merge
(
os_facts
)
else
os_facts
end
##
## get defaults values from params
##
defaults
=
get_defaults
(
facts
)
context
"on
#{
os
}
"
do
tests
.
each
do
|
title
,
local_params
|
context
title
do
params
=
{
'ensure'
=>
'present'
,
'version'
=>
defaults
[
'machine_version'
]
,
'install_path'
=>
defaults
[
'machine_install_path'
]
,
'proxy'
=>
:undef
,
'url'
=>
:undef
,
'curl_ensure'
=>
defaults
[
'curl_ensure'
]
,
}
.
merge
(
local_params
)
let
(
:facts
)
do
facts
end
let
(
:params
)
do
params
end
if
params
[
'proxy'
]
!=
:undef
if
params
[
'proxy'
]
!~
'^((http[s]?)?:\/\/)?([^:^@]+:[^:^@]+@|)([\da-z\.-]+)\.([\da-z\.]{2,6})(:[\d])?([\/\w \.-]*)*\/?$'
it
{
is_expected
.
to
compile
.
and_raise_error
(
%r{}
)
}
next
end
end
include_examples
'machine'
,
params
,
facts
,
defaults
end
end
end
end
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Sat, Jun 21, 7:26 PM (2 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3370260
Attached To
R205 puppet-puppetlabs-docker
Event Timeline
Log In to Comment