Yumrepo bug fix and added "require" for package 88/88/3
authorJosh Farwell <jfarwell@linuxfoundation.org>
Wed, 3 Jun 2015 19:35:29 +0000 (12:35 -0700)
committerJosh Farwell <jfarwell@linuxfoundation.org>
Wed, 3 Jun 2015 21:24:49 +0000 (14:24 -0700)
Yumrepo statement was creating a file without "name" defined, fixed.
Added "require" statement for the mailman3 package to prevent yum
errors as a result of not having the repo installed, updated rspec
tests. Fixed formatting.

Change-Id: I38cb0787bdda4a5d99f5d6cda2d9c107429eb243
Signed-off-by: Josh Farwell <jfarwell@linuxfoundation.org>
manifests/install.pp
spec/classes/install_spec.rb

index 88b64d6..034042a 100644 (file)
@@ -46,19 +46,22 @@ class mailman3::install (
 
   # Install mailman3 yum repo - EL7 only at this time
   yumrepo { 'fedorapeople-mailman3':
-    ensure        => present,
-    name          => 'fedorapeople-mailman3',
-    baseurl       => 'https://repos.fedorapeople.org/repos/abompard/hyperkitty/el-7/x86_64/',
-    gpgcheck      => 'no',
-    enabled       => true,
+    ensure   => present,
+    name     => 'fedorapeople-mailman3',
+    descr    => 'FedoraPeople Mailman 3 Repo',
+    baseurl  => 'https://repos.fedorapeople.org/repos/abompard/hyperkitty/el-7/x86_64/',
+    gpgcheck => 'no',
+    enabled  => true,
   }
 
   # Install mailman core if we want to
   # TODO: Split out into subclasses for each application component
   if ($install_mailman) {
     package { 'mailman3':
-      ensure => $mailman_version,
+      ensure  => $mailman_version,
+      require => Yumrepo['fedorapeople-mailman3'],
     }
+
   }
 
 }
index 102af91..bd5dc5c 100644 (file)
@@ -48,7 +48,7 @@ describe 'mailman3::install', :type => :class do
     it 'should have mailman if install_mailman is true' do
       params.merge!({'install_mailman' => true})
 
-      should contain_package('mailman3')
+      should contain_package('mailman3').that_requires('Yumrepo[fedorapeople-mailman3]')
     end
 
   end