Hashar has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/296927

Change subject: rsync: fix spec that used ruby 1.8 syntax
......................................................................

rsync: fix spec that used ruby 1.8 syntax

In Ruby 1.9 and above, String no more has a to_a() method. Change the
expectation to use a pure string, feed it with plain string by joining
the Array with ' '.

Add rsync to .fixtures.yml

Bug: T78342
Change-Id: If28077e4b910038e2cf9eb94ed299c77b269d782
---
A modules/rsync/.fixtures.yml
M modules/rsync/spec/defines/server_module_spec.rb
2 files changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/27/296927/1

diff --git a/modules/rsync/.fixtures.yml b/modules/rsync/.fixtures.yml
new file mode 100644
index 0000000..9e7fb43
--- /dev/null
+++ b/modules/rsync/.fixtures.yml
@@ -0,0 +1,3 @@
+fixtures:
+    symlinks:
+        rsync: "#{source_dir}"
diff --git a/modules/rsync/spec/defines/server_module_spec.rb 
b/modules/rsync/spec/defines/server_module_spec.rb
index 736420f..70fc4bf 100644
--- a/modules/rsync/spec/defines/server_module_spec.rb
+++ b/modules/rsync/spec/defines/server_module_spec.rb
@@ -53,14 +53,14 @@
     :uid            => '4682',
     :gid            => '4682',
     :secrets_file   => '/path/to/secrets',
-    :hosts_allow    => ['localhost', '169.254.42.51'],
-    :hosts_deny     => ['some-host.example.com', '10.0.0.128']
+    :hosts_allow    => ['localhost', '169.254.42.51'].join(' '),
+    :hosts_deny     => ['some-host.example.com', '10.0.0.128'].join(' '),
   }.each do |k,v|
     describe "when overriding #{k}" do
       let :params do
         mandatory_params.merge({ k => v })
       end
-      it { should 
contain_file(fragment_file).with_content(/^#{k.to_s.gsub('_', ' 
')}\s*=\s*#{v.to_a.join(' ')}$/)}
+      it { should 
contain_file(fragment_file).with_content(/^#{k.to_s.gsub('_', ' 
')}\s*=\s*#{v}$/)}
     end
   end
 

-- 
To view, visit https://gerrit.wikimedia.org/r/296927
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If28077e4b910038e2cf9eb94ed299c77b269d782
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <has...@free.fr>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to