From 9917fbc180ac32c567e3edc6b51670f485bb1213 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Tue, 12 Mar 2019 17:18:38 +0100 Subject: [PATCH] Adjust clients $compression type to match servers Allow new compress option --- manifests/client.pp | 2 +- spec/defines/openvpn_client_spec.rb | 4 ++-- spec/defines/openvpn_server_spec.rb | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/manifests/client.pp b/manifests/client.pp index e1ce5cc0..668ee774 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -45,7 +45,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, diff --git a/spec/defines/openvpn_client_spec.rb b/spec/defines/openvpn_client_spec.rb index beeeffc4..3808bda2 100644 --- a/spec/defines/openvpn_client_spec.rb +++ b/spec/defines/openvpn_client_spec.rb @@ -99,7 +99,7 @@ let(:params) do { 'server' => 'test_server', - 'compression' => 'comp-lzo', + 'compression' => 'compress lz4', 'dev' => 'tap', 'mute' => 10, 'mute_replay_warnings' => false, @@ -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$}) } diff --git a/spec/defines/openvpn_server_spec.rb b/spec/defines/openvpn_server_spec.rb index d35248b8..b6f21b1b 100644 --- a/spec/defines/openvpn_server_spec.rb +++ b/spec/defines/openvpn_server_spec.rb @@ -241,7 +241,7 @@ 'city' => 'Some City', 'organization' => 'example.org', 'email' => 'testemail@example.org', - 'compression' => 'fake_compression', + 'compression' => 'compress lz4', 'port' => '123', 'proto' => 'udp', 'group' => 'someone', @@ -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$}) } @@ -377,7 +377,7 @@ 'city' => 'Some City', 'organization' => 'example.org', 'email' => 'testemail@example.org', - 'compression' => 'fake_compression', + 'compression' => 'compress lz4', 'port' => '123', 'proto' => 'udp', 'group' => 'someone', @@ -683,7 +683,7 @@ 'city' => 'Some City', 'organization' => 'example.org', 'email' => 'testemail@example.org', - 'compression' => 'fake_compression', + 'compression' => 'compress lz4', 'port' => '123', 'proto' => 'udp', 'group' => 'someone',