Skip to content

Commit

Permalink
WIP Add new client to test revoke (not working)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
chloesoe committed May 13, 2019
1 parent b848cb9 commit a070186
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion spec/acceptance/openvpn_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand All @@ -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
Expand Down

0 comments on commit a070186

Please sign in to comment.