From a070186dd9939c4d6c0027f42608d77cc94612ec Mon Sep 17 00:00:00 2001 From: chloesoe Date: Mon, 13 May 2019 14:57:45 +0200 Subject: [PATCH] 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. --- spec/acceptance/openvpn_spec.rb | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/spec/acceptance/openvpn_spec.rb b/spec/acceptance/openvpn_spec.rb index c0ef64b0..9f5153ee 100644 --- a/spec/acceptance/openvpn_spec.rb +++ b/spec/acceptance/openvpn_spec.rb @@ -36,6 +36,7 @@ apply_manifest_on(hosts_as('vpnserver'), pp, catch_failures: true) apply_manifest_on(hosts_as('vpnserver'), pp, catch_changes: true) end + it 'creates openvpn client certificate idempotently' do pp = %( openvpn::server { 'test_openvpn_server': @@ -56,7 +57,18 @@ remote_host => $facts['networking']['ip'], tls_cipher => 'TLS-DHE-RSA-WITH-AES-128-GCM-SHA256:TLS-DHE-RSA-WITH-AES-128-CBC-SHA', } - ) + + openvpn::client { 'vpnclientb' : + server => 'test_openvpn_server', + require => Openvpn::Server['test_openvpn_server'], + remote_host => $facts['networking']['ip'], + tls_cipher => 'TLS-DHE-RSA-WITH-AES-128-GCM-SHA256:TLS-DHE-RSA-WITH-AES-128-CBC-SHA', + } + + openvpn::revoke { 'vpnclientb' : + server => 'test_openvpn_server', + } + ) apply_manifest_on(hosts_as('vpnserver'), pp, catch_failures: true) apply_manifest_on(hosts_as('vpnserver'), pp, catch_changes: true) end