Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F8395547
letsencrypt_spec.rb
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
letsencrypt_spec.rb
View Options
require
'spec_helper_acceptance'
describe
'letsencrypt'
do
context
'with defaults values'
do
pp
=
%(
class { 'letsencrypt' :
email => 'letsregister@example.com',
config => {
'server' => 'https://acme-staging-v02.api.letsencrypt.org/directory',
},
}
)
it
'installs letsencrypt without error'
do
apply_manifest
(
pp
,
catch_failures
:
true
)
end
it
'installs letsencrypt idempotently'
do
apply_manifest
(
pp
,
catch_changes
:
true
)
end
describe
file
(
'/etc/letsencrypt/cli.ini'
)
do
it
{
is_expected
.
to
be_file
}
it
{
is_expected
.
to
be_owned_by
'root'
}
it
{
is_expected
.
to
be_grouped_into
'root'
}
it
{
is_expected
.
to
be_mode
644
}
its
(
:content
)
{
is_expected
.
to
match
%r{server = https://acme-staging-v02.api.letsencrypt.org/directory}
}
its
(
:content
)
{
is_expected
.
to
match
%r{email = letsregister@example.com}
}
end
end
context
'with install_method => vcs'
do
pp
=
%(
class { 'letsencrypt' :
install_method => 'vcs',
email => 'letsregister@example.com',
config => {
'server' => 'https://acme-staging-v02.api.letsencrypt.org/directory',
},
}
)
it
'installs letsencrypt without error'
do
apply_manifest
(
pp
,
catch_failures
:
true
)
end
it
'installs letsencrypt idempotently'
do
apply_manifest
(
pp
,
catch_changes
:
true
)
end
describe
file
(
'/etc/letsencrypt/cli.ini'
)
do
it
{
is_expected
.
to
be_file
}
it
{
is_expected
.
to
be_owned_by
'root'
}
it
{
is_expected
.
to
be_grouped_into
'root'
}
it
{
is_expected
.
to
be_mode
644
}
its
(
:content
)
{
is_expected
.
to
match
%r{server = https://acme-staging-v02.api.letsencrypt.org/directory}
}
its
(
:content
)
{
is_expected
.
to
match
%r{email = letsregister@example.com}
}
end
describe
file
(
'/opt/letsencrypt/.venv/bin/letsencrypt'
)
do
it
{
is_expected
.
to
be_file
}
it
{
is_expected
.
to
be_owned_by
'root'
}
it
{
is_expected
.
to
be_grouped_into
'root'
}
it
{
is_expected
.
to
be_mode
755
}
end
end
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Jun 4 2025, 7:40 PM (10 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3399319
Attached To
R192 puppet-puppet-letsencrypt
Event Timeline
Log In to Comment