Skip to content

Commit 9917fbc

Browse files
committed
Adjust clients $compression type to match servers
Allow new compress option
1 parent 5fe64cd commit 9917fbc

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
@@ -45,7 +45,7 @@
4545
#
4646
define openvpn::client (
4747
String $server,
48-
Enum['comp-lzo', ''] $compression = 'comp-lzo',
48+
String $compression = 'comp-lzo',
4949
Enum['tap', 'tun'] $dev = 'tun',
5050
Integer $mute = 20,
5151
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$}) }
@@ -377,7 +377,7 @@
377377
'city' => 'Some City',
378378
'organization' => 'example.org',
379379
'email' => '[email protected]',
380-
'compression' => 'fake_compression',
380+
'compression' => 'compress lz4',
381381
'port' => '123',
382382
'proto' => 'udp',
383383
'group' => 'someone',
@@ -683,7 +683,7 @@
683683
'city' => 'Some City',
684684
'organization' => 'example.org',
685685
'email' => '[email protected]',
686-
'compression' => 'fake_compression',
686+
'compression' => 'compress lz4',
687687
'port' => '123',
688688
'proto' => 'udp',
689689
'group' => 'someone',

0 commit comments

Comments
 (0)