Gehel has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345866 )

Change subject: osm - trying to fix tests
......................................................................

osm - trying to fix tests

Change-Id: If4f207752fcfc11575a9732b6fa88c55462377b7
---
M Rakefile
M modules/osm/.fixtures.yml
M modules/osm/spec/classes/osm_spec.rb
3 files changed, 18 insertions(+), 38 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/66/345866/1

diff --git a/Rakefile b/Rakefile
index 9cc5d77..b4e9a54 100644
--- a/Rakefile
+++ b/Rakefile
@@ -173,7 +173,7 @@
 
     # Hold a list of modules not passing tests.
     failed_modules = []
-    ignored_modules = ['mysql', 'osm', 'postgresql', 'puppetdbquery', 
'stdlib', 'wdqs']
+    ignored_modules = ['mysql', 'postgresql', 'puppetdbquery', 'stdlib', 
'wdqs']
 
     # Invoke rake whenever a module has a Rakefile.
     spec_modules.each do |module_name|
diff --git a/modules/osm/.fixtures.yml b/modules/osm/.fixtures.yml
index 1756520..aec737f 100644
--- a/modules/osm/.fixtures.yml
+++ b/modules/osm/.fixtures.yml
@@ -1,5 +1,7 @@
 fixtures:
     symlinks:
         osm: "#{source_dir}"
-        stdlib: "../../../../stdlib"
-        wmflib: "../../../../wmflib"
+        apt:       "../../../../apt"
+        logrotate: "../../../../logrotate"
+        stdlib:    "../../../../stdlib"
+        wmflib:    "../../../../wmflib"
diff --git a/modules/osm/spec/classes/osm_spec.rb 
b/modules/osm/spec/classes/osm_spec.rb
index 2803d56..583dc60 100644
--- a/modules/osm/spec/classes/osm_spec.rb
+++ b/modules/osm/spec/classes/osm_spec.rb
@@ -1,46 +1,24 @@
 require 'spec_helper'
 
 describe 'osm', :type => :class do
-    context 'ensure present' do
-        let(:params) { {
-            :ensure => 'present',
-        } }
 
-        context 'on Ubuntu Precise' do
-            let(:facts) { {
-                :lsbdistrelease => 'Precise',
-                :lsbdistid      => 'Ubuntu',
-            } }
-
-            context 'ensure present' do
-                it { should 
contain_package('osm2pgsql').with_ensure('present') }
-                it { should contain_package('osmosis').with_ensure('present') }
-            end
-        end
-
-        context 'on Debian Jessie' do
-            let(:facts) { {
-                :lsbdistrelease => 'Jessie',
-                :lsbdistid      => 'Debian',
-            } }
-
-            context 'ensure present' do
-                it { should 
contain_package('osm2pgsql').with_ensure('0.90.0+ds-1~bpo8+1') }
-                it { should contain_package('osmosis').with_ensure('present') }
-            end
-        end
-    end
-
-    context 'ensure absent' do
-        let(:params) { {
-            :ensure => 'absent',
-        } }
+    context 'on Ubuntu Precise' do
         let(:facts) { {
             :lsbdistrelease => 'Precise',
             :lsbdistid      => 'Ubuntu',
         } }
 
-        it { should contain_package('osm2pgsql').with_ensure('absent') }
-        it { should contain_package('osmosis').with_ensure('absent') }
+        it { should contain_package('osm2pgsql').with_ensure('present') }
+        it { should contain_package('osmosis').with_ensure('present') }
     end
+
+    context 'on Debian Jessie' do
+        let(:facts) { {
+            :lsbdistrelease => 'Jessie',
+            :lsbdistid      => 'Debian',
+        } }
+
+        it { should contain_apt__pin('osm2pgsql').with_pin('release 
a=jessie-backports') }
+    end
+
 end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If4f207752fcfc11575a9732b6fa88c55462377b7
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Gehel <guillaume.leder...@wikimedia.org>

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

Reply via email to