Skip to content

Commit

Permalink
Merge pull request #333 from jkroepke/client_compression
Browse files Browse the repository at this point in the history
Adjust clients $compression type to match servers
  • Loading branch information
Dan33l authored May 9, 2019
2 parents 48d1765 + 9917fbc commit a8dc5ad
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion manifests/client.pp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#
define openvpn::client (
String $server,
Enum['comp-lzo', ''] $compression = 'comp-lzo',
String $compression = 'comp-lzo',
Enum['tap', 'tun'] $dev = 'tun',
Integer $mute = 20,
Boolean $mute_replay_warnings = true,
Expand Down
4 changes: 2 additions & 2 deletions spec/defines/openvpn_client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
let(:params) do
{
'server' => 'test_server',
'compression' => 'comp-lzo',
'compression' => 'compress lz4',
'dev' => 'tap',
'mute' => 10,
'mute_replay_warnings' => false,
Expand Down Expand Up @@ -135,7 +135,7 @@
it { is_expected.to contain_file('/etc/openvpn/test_server/download-configs/test_client/test_client.conf').with_content(%r{^proto\s+udp$}) }
it { is_expected.to contain_file('/etc/openvpn/test_server/download-configs/test_client/test_client.conf').with_content(%r{^remote\s+somewhere\s+123$}) }
it { is_expected.to contain_file('/etc/openvpn/test_server/download-configs/test_client/test_client.conf').with_content(%r{^remote\s+galaxy\s+123$}) }
it { is_expected.to contain_file('/etc/openvpn/test_server/download-configs/test_client/test_client.conf').with_content(%r{^comp-lzo$}) }
it { is_expected.to contain_file('/etc/openvpn/test_server/download-configs/test_client/test_client.conf').with_content(%r{^compress lz4$}) }
it { is_expected.to contain_file('/etc/openvpn/test_server/download-configs/test_client/test_client.conf').with_content(%r{^resolv-retry\s+2m$}) }
it { is_expected.to contain_file('/etc/openvpn/test_server/download-configs/test_client/test_client.conf').with_content(%r{^verb\s+1$}) }
it { is_expected.to contain_file('/etc/openvpn/test_server/download-configs/test_client/test_client.conf').with_content(%r{^mute\s+10$}) }
Expand Down
8 changes: 4 additions & 4 deletions spec/defines/openvpn_server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
'city' => 'Some City',
'organization' => 'example.org',
'email' => '[email protected]',
'compression' => 'fake_compression',
'compression' => 'compress lz4',
'port' => '123',
'proto' => 'udp',
'group' => 'someone',
Expand Down Expand Up @@ -293,7 +293,7 @@
it { is_expected.to contain_file('/etc/openvpn/test_server.conf').with_content(%r{^proto\s+udp$}) }
it { is_expected.not_to contain_file('/etc/openvpn/test_server.conf').with_content(%r{^proto\s+tls-server$}) }
it { is_expected.to contain_file('/etc/openvpn/test_server.conf').with_content(%r{^port\s+123$}) }
it { is_expected.to contain_file('/etc/openvpn/test_server.conf').with_content(%r{^fake_compression$}) }
it { is_expected.to contain_file('/etc/openvpn/test_server.conf').with_content(%r{^compress lz4$}) }
it { is_expected.to contain_file('/etc/openvpn/test_server.conf').with_content(%r{^group\s+someone$}) }
it { is_expected.to contain_file('/etc/openvpn/test_server.conf').with_content(%r{^user\s+someone$}) }
it { is_expected.to contain_file('/etc/openvpn/test_server.conf').with_content(%r{^log\-append\s+/var/log/openvpn/test_server\.log$}) }
Expand Down Expand Up @@ -396,7 +396,7 @@
'city' => 'Some City',
'organization' => 'example.org',
'email' => '[email protected]',
'compression' => 'fake_compression',
'compression' => 'compress lz4',
'port' => '123',
'proto' => 'udp',
'group' => 'someone',
Expand Down Expand Up @@ -702,7 +702,7 @@
'city' => 'Some City',
'organization' => 'example.org',
'email' => '[email protected]',
'compression' => 'fake_compression',
'compression' => 'compress lz4',
'port' => '123',
'proto' => 'udp',
'group' => 'someone',
Expand Down

0 comments on commit a8dc5ad

Please sign in to comment.