Skip to content

Commit a8dc5ad

Browse files
authored
Merge pull request #333 from jkroepke/client_compression
Adjust clients $compression type to match servers
2 parents 48d1765 + 9917fbc commit a8dc5ad

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

manifests/client.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
#
4747
define openvpn::client (
4848
String $server,
49-
Enum['comp-lzo', ''] $compression = 'comp-lzo',
49+
String $compression = 'comp-lzo',
5050
Enum['tap', 'tun'] $dev = 'tun',
5151
Integer $mute = 20,
5252
Boolean $mute_replay_warnings = true,

spec/defines/openvpn_client_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
let(:params) do
100100
{
101101
'server' => 'test_server',
102-
'compression' => 'comp-lzo',
102+
'compression' => 'compress lz4',
103103
'dev' => 'tap',
104104
'mute' => 10,
105105
'mute_replay_warnings' => false,
@@ -135,7 +135,7 @@
135135
it { is_expected.to contain_file('/etc/openvpn/test_server/download-configs/test_client/test_client.conf').with_content(%r{^proto\s+udp$}) }
136136
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$}) }
137137
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$}) }
138-
it { is_expected.to contain_file('/etc/openvpn/test_server/download-configs/test_client/test_client.conf').with_content(%r{^comp-lzo$}) }
138+
it { is_expected.to contain_file('/etc/openvpn/test_server/download-configs/test_client/test_client.conf').with_content(%r{^compress lz4$}) }
139139
it { is_expected.to contain_file('/etc/openvpn/test_server/download-configs/test_client/test_client.conf').with_content(%r{^resolv-retry\s+2m$}) }
140140
it { is_expected.to contain_file('/etc/openvpn/test_server/download-configs/test_client/test_client.conf').with_content(%r{^verb\s+1$}) }
141141
it { is_expected.to contain_file('/etc/openvpn/test_server/download-configs/test_client/test_client.conf').with_content(%r{^mute\s+10$}) }

spec/defines/openvpn_server_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@
241241
'city' => 'Some City',
242242
'organization' => 'example.org',
243243
'email' => '[email protected]',
244-
'compression' => 'fake_compression',
244+
'compression' => 'compress lz4',
245245
'port' => '123',
246246
'proto' => 'udp',
247247
'group' => 'someone',
@@ -293,7 +293,7 @@
293293
it { is_expected.to contain_file('/etc/openvpn/test_server.conf').with_content(%r{^proto\s+udp$}) }
294294
it { is_expected.not_to contain_file('/etc/openvpn/test_server.conf').with_content(%r{^proto\s+tls-server$}) }
295295
it { is_expected.to contain_file('/etc/openvpn/test_server.conf').with_content(%r{^port\s+123$}) }
296-
it { is_expected.to contain_file('/etc/openvpn/test_server.conf').with_content(%r{^fake_compression$}) }
296+
it { is_expected.to contain_file('/etc/openvpn/test_server.conf').with_content(%r{^compress lz4$}) }
297297
it { is_expected.to contain_file('/etc/openvpn/test_server.conf').with_content(%r{^group\s+someone$}) }
298298
it { is_expected.to contain_file('/etc/openvpn/test_server.conf').with_content(%r{^user\s+someone$}) }
299299
it { is_expected.to contain_file('/etc/openvpn/test_server.conf').with_content(%r{^log\-append\s+/var/log/openvpn/test_server\.log$}) }
@@ -396,7 +396,7 @@
396396
'city' => 'Some City',
397397
'organization' => 'example.org',
398398
'email' => '[email protected]',
399-
'compression' => 'fake_compression',
399+
'compression' => 'compress lz4',
400400
'port' => '123',
401401
'proto' => 'udp',
402402
'group' => 'someone',
@@ -702,7 +702,7 @@
702702
'city' => 'Some City',
703703
'organization' => 'example.org',
704704
'email' => '[email protected]',
705-
'compression' => 'fake_compression',
705+
'compression' => 'compress lz4',
706706
'port' => '123',
707707
'proto' => 'udp',
708708
'group' => 'someone',

0 commit comments

Comments
 (0)