From f0161d0a5665d34092ee8c3d8c2ea580385b7bdf Mon Sep 17 00:00:00 2001 From: Steve Russell Date: Thu, 11 Aug 2022 18:42:01 -0700 Subject: [PATCH] (SIMP-10740) Update documentation and acc. tests Updated the README.md file to reflect contributed changes to the module, and updated the acceptance tests (which I cannot run, so gosh I hope they work) to use the newer convention for user/password specification. --- README.md | 2 +- .../suites/default/10_server_client_spec.rb | 29 ++++++++----------- .../default/20_server_client_stunnel_spec.rb | 20 ++++++------- 3 files changed, 22 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 9044a05..8992b18 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ To configure a Compile Master (or other node) to function as both a server and a client (of the primary server), setup hiera for the node: ``` -rsync::server::global::port: 8873 +rsync::server::listen_port: 8873 rsync::server::trusted_nets: - - diff --git a/spec/acceptance/suites/default/10_server_client_spec.rb b/spec/acceptance/suites/default/10_server_client_spec.rb index 02cde0f..d31c150 100644 --- a/spec/acceptance/suites/default/10_server_client_spec.rb +++ b/spec/acceptance/suites/default/10_server_client_spec.rb @@ -45,8 +45,7 @@ } rsync::server::section { 'test': - auth_users => ['test_user'], - user_pass => ['test_user:test_pass'], + auth_users => { 'test_user' => 'test_pass' }, comment => 'A test system', hosts_allow => ['#{server1_ip}', '#{server2_ip}'], path => '/srv/rsync/test', @@ -80,24 +79,20 @@ } let(:hieradata_server1) {{ - 'iptables::precise_match' => true, - 'simp_options::pki' => false, - 'simp_options::firewall' => true, - 'rsync::server::stunnel' => false, - 'rsync::server::trusted_nets' => [server2_ip], - 'rsync::server::global::trusted_nets' => [server2_ip], - 'rsync::server::global::address' => '0.0.0.0', + 'iptables::precise_match' => true, + 'simp_options::pki' => false, + 'simp_options::firewall' => true, + 'rsync::server::stunnel' => false, + 'rsync::server::trusted_nets' => [server2_ip], }} let(:hieradata_server2) {{ - 'iptables::precise_match' => true, - 'simp_options::pki' => false, - 'simp_options::firewall' => true, - 'rsync::server::stunnel' => false, - 'rsync::server::global::port' => 8873, - 'rsync::server::trusted_nets' => [server1_ip], - 'rsync::server::global::trusted_nets' => [server1_ip], - 'rsync::server::global::address' => '0.0.0.0', + 'iptables::precise_match' => true, + 'simp_options::pki' => false, + 'simp_options::firewall' => true, + 'rsync::server::stunnel' => false, + 'rsync::server::listen_port' => 8873, + 'rsync::server::trusted_nets' => [server1_ip], }} let(:server1_interface) { get_private_network_interface(server1) } diff --git a/spec/acceptance/suites/default/20_server_client_stunnel_spec.rb b/spec/acceptance/suites/default/20_server_client_stunnel_spec.rb index a17dc58..eb370a9 100644 --- a/spec/acceptance/suites/default/20_server_client_stunnel_spec.rb +++ b/spec/acceptance/suites/default/20_server_client_stunnel_spec.rb @@ -49,11 +49,10 @@ } rsync::server::section { 'test': - auth_users => ['test_user'], - user_pass => ['test_user:test_pass'], - comment => 'A test system', - path => '/srv/rsync/test', - require => File['/srv/rsync/test/test_file_srvcli2_server1'] + auth_users => { 'test_user' => 'test_pass' }, + comment => 'A test system', + path => '/srv/rsync/test', + require => File['/srv/rsync/test/test_file_srvcli2_server1'] } stunnel::connection { 'rsync': @@ -88,11 +87,10 @@ } rsync::server::section { 'test': - auth_users => ['test_user'], - user_pass => ['test_user:test_pass'], - comment => 'A test system', - path => '/srv/rsync/test', - require => File['/srv/rsync/test/test_file_srvcli2_server2'] + auth_users => { 'test_user' => 'test_pass' }, + comment => 'A test system', + path => '/srv/rsync/test', + require => File['/srv/rsync/test/test_file_srvcli2_server2'] } stunnel::connection { 'rsync': @@ -141,7 +139,7 @@ 'simp_options::pki::source' => '/etc/pki/simp-testing/pki', 'simp_options::firewall' => true, 'rsync::server::stunnel' => true, - 'rsync::server::global::port' => 8873, + 'rsync::server::listen_port' => 8873, 'rsync::server::trusted_nets' => [server1_ip], }}