Skip to content

Commit 53ed8a9

Browse files
authored
Merge pull request #173 from syseleven/fix/proper_vcs_installation
Upgrade vcs version to 0.30.2
2 parents f8676d8 + 23dc888 commit 53ed8a9

File tree

4 files changed

+39
-4
lines changed

4 files changed

+39
-4
lines changed

manifests/params.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
$venv_path = '/opt/letsencrypt/.venv' # virtualenv path for vcs-installed letsencrypt
1010
$repo = 'https://github.com/certbot/certbot.git'
1111
$cron_scripts_path = "${facts['puppet_vardir']}/letsencrypt" # path for renewal scripts called by cron
12-
$version = 'v0.30.0'
12+
$version = 'v0.30.2'
1313
$config = {
1414
'server' => 'https://acme-v01.api.letsencrypt.org/directory',
1515
}

spec/acceptance/letsencrypt_spec.rb

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,39 @@ class { 'letsencrypt' :
2727
its(:content) { is_expected.to match %r{email = [email protected]} }
2828
end
2929
end
30+
31+
context 'with install_method => vcs' do
32+
pp = %(
33+
class { 'letsencrypt' :
34+
install_method => 'vcs',
35+
email => '[email protected]',
36+
config => {
37+
'server' => 'https://acme-staging.api.letsencrypt.org/directory',
38+
},
39+
}
40+
)
41+
42+
it 'installs letsencrypt without error' do
43+
apply_manifest(pp, catch_failures: true)
44+
end
45+
it 'installs letsencrypt idempotently' do
46+
apply_manifest(pp, catch_changes: true)
47+
end
48+
49+
describe file('/etc/letsencrypt/cli.ini') do
50+
it { is_expected.to be_file }
51+
it { is_expected.to be_owned_by 'root' }
52+
it { is_expected.to be_grouped_into 'root' }
53+
it { is_expected.to be_mode 644 }
54+
its(:content) { is_expected.to match %r{server = https://acme-staging.api.letsencrypt.org/directory} }
55+
its(:content) { is_expected.to match %r{email = [email protected]} }
56+
end
57+
58+
describe file('/opt/letsencrypt/.venv/bin/letsencrypt') do
59+
it { is_expected.to be_file }
60+
it { is_expected.to be_owned_by 'root' }
61+
it { is_expected.to be_grouped_into 'root' }
62+
it { is_expected.to be_mode 755 }
63+
end
64+
end
3065
end

spec/classes/letsencrypt_install_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
manage_dependencies: true,
1212
path: '/opt/letsencrypt',
1313
repo: 'https://github.com/certbot/certbot.git',
14-
version: 'v0.30.0',
14+
version: 'v0.30.2',
1515
package_name: 'letsencrypt'
1616
}
1717
end
@@ -64,7 +64,7 @@
6464

6565
it 'contains the correct resources' do
6666
is_expected.to contain_vcsrepo('/opt/letsencrypt').with(source: 'https://github.com/certbot/certbot.git',
67-
revision: 'v0.30.0')
67+
revision: 'v0.30.2')
6868
is_expected.to contain_package('python')
6969
is_expected.to contain_package('git')
7070

spec/classes/letsencrypt_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
manage_install: true,
3232
manage_dependencies: true,
3333
repo: 'https://github.com/certbot/certbot.git',
34-
version: 'v0.30.0').that_notifies('Exec[initialize letsencrypt]')
34+
version: 'v0.30.2').that_notifies('Exec[initialize letsencrypt]')
3535
is_expected.to contain_exec('initialize letsencrypt')
3636
is_expected.to contain_class('letsencrypt::config').that_comes_before('Exec[initialize letsencrypt]')
3737

0 commit comments

Comments
 (0)