Skip to content

Commit a070186

Browse files
committed
WIP Add new client to test revoke (not working)
Add a new client with an additional revoke test. Unfortunately I was not able to get the tests working. Command to start the test is: `PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1804-64vpnserver.ma{hostname=vpnserver}-ubuntu1804-64vpnclienta.a{hostname=vpnclienta} BEAKER_HYPERVISOR=docker LANG=C LC_ALL=C bundle exec rake beaker` It looks like, there weren't any revoke tests yet. So as I'm new to puppet I was not able to create revoking tests from scratch in a reasonable time.
1 parent b848cb9 commit a070186

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

spec/acceptance/openvpn_spec.rb

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
apply_manifest_on(hosts_as('vpnserver'), pp, catch_failures: true)
3737
apply_manifest_on(hosts_as('vpnserver'), pp, catch_changes: true)
3838
end
39+
3940
it 'creates openvpn client certificate idempotently' do
4041
pp = %(
4142
openvpn::server { 'test_openvpn_server':
@@ -56,7 +57,18 @@
5657
remote_host => $facts['networking']['ip'],
5758
tls_cipher => 'TLS-DHE-RSA-WITH-AES-128-GCM-SHA256:TLS-DHE-RSA-WITH-AES-128-CBC-SHA',
5859
}
59-
)
60+
61+
openvpn::client { 'vpnclientb' :
62+
server => 'test_openvpn_server',
63+
require => Openvpn::Server['test_openvpn_server'],
64+
remote_host => $facts['networking']['ip'],
65+
tls_cipher => 'TLS-DHE-RSA-WITH-AES-128-GCM-SHA256:TLS-DHE-RSA-WITH-AES-128-CBC-SHA',
66+
}
67+
68+
openvpn::revoke { 'vpnclientb' :
69+
server => 'test_openvpn_server',
70+
}
71+
)
6072
apply_manifest_on(hosts_as('vpnserver'), pp, catch_failures: true)
6173
apply_manifest_on(hosts_as('vpnserver'), pp, catch_changes: true)
6274
end

0 commit comments

Comments
 (0)