]> gitweb.fluxo.info Git - puppet-samba.git/commitdiff
Fix requires and notify
authorPete Brown <pete@abstractit.com.au>
Tue, 5 Jul 2016 14:23:46 +0000 (00:23 +1000)
committerPete Brown <pete@abstractit.com.au>
Tue, 5 Jul 2016 14:23:46 +0000 (00:23 +1000)
spec/defines/samba__server__share_spec.rb

index e6b24b854908d20e7219c3e876cb19b70053ee44..26c39a1352419806bb675feb4794a3f4e213b77a 100644 (file)
@@ -22,16 +22,16 @@ describe 'samba::server::share', :type => :define do
           :incl    => '/etc/samba/smb.conf',
           :lens    => 'Samba.lns',
           :context => '/files/etc/samba/smb.conf',
-          :changes => ["set target[. = 'test_share'] 'test_share'"]
-          ).that_requires('Class[Samba::Server::Config]'
-          ).that_notifies('Class[Samba::Server::Service]')
+          :changes => ["set target[. = 'test_share'] 'test_share'"],
+          :requires => 'Class[Samba::Server::Config]',
+          :notify   => 'Class[Samba::Server::Service]')
         }
         it { is_expected.to contain_augeas('test_share-changes').with(
-          :incl    => '/etc/samba/smb.conf',
-          :lens    => 'Samba.lns',
-          :context => '/files/etc/samba/smb.conf',
-          ).that_requires('Class[Samba::Server::Config]'
-          ).that_notifies('Class[Samba::Server::Service]')
+          :incl     => '/etc/samba/smb.conf',
+          :lens     => 'Samba.lns',
+          :context  => '/files/etc/samba/smb.conf',
+          :requires => 'Augeas[test_share-section]',
+          :notify   => 'Class[Samba::Server::Service]')
         }
       end#no params
 
@@ -58,17 +58,17 @@ describe 'samba::server::share', :type => :define do
           :incl    => '/etc/samba/smb.conf',
           :lens    => 'Samba.lns',
           :context => '/files/etc/samba/smb.conf',
-          :changes => ["set target[. = 'test_share'] 'test_share'"]
-          ).that_requires('Class[Samba::Server::Config]'
-          ).that_notifies('Class[Samba::Server::Service]')
+          :changes => ["set target[. = 'test_share'] 'test_share'"],
+          :requires => 'Class[Samba::Server::Config]',
+          :notify   => 'Class[Samba::Server::Service]')
         }
         it { is_expected.to contain_augeas('test_share-changes').with(
           :incl    => '/etc/samba/smb.conf',
           :lens    => 'Samba.lns',
           :context => '/files/etc/samba/smb.conf',
-          :changes => ["set \"target[. = 'test_share']/available\" yes"]
-          ).that_requires('Class[Samba::Server::Config]'
-          ).that_notifies('Class[Samba::Server::Service]')
+          :changes => ["set \"target[. = 'test_share']/available\" yes"],
+          :requires => 'Augeas[test_share-section]',
+          :notify   => 'Class[Samba::Server::Service]')
         }
       end#no params
 
@@ -83,17 +83,17 @@ describe 'samba::server::share', :type => :define do
           :incl    => '/etc/samba/smb.conf',
           :lens    => 'Samba.lns',
           :context => '/files/etc/samba/smb.conf',
-          :changes => ["set target[. = 'test_share'] 'test_share'"]
-          ).that_requires('Class[Samba::Server::Config]'
-          ).that_notifies('Class[Samba::Server::Service]')
+          :changes => ["set target[. = 'test_share'] 'test_share'"],
+          :requires => 'Class[Samba::Server::Config]',
+          :notify   => 'Class[Samba::Server::Service]')
         }
         it { is_expected.to contain_augeas('test_share-changes').with(
           :incl    => '/etc/samba/smb.conf',
           :lens    => 'Samba.lns',
           :context => '/files/etc/samba/smb.conf',
-          :changes => ["set \"target[. = 'test_share']/root_preexec\" /bin/true"]
-          ).that_requires('Class[Samba::Server::Config]'
-          ).that_notifies('Class[Samba::Server::Service]')
+          :changes => ["set \"target[. = 'test_share']/root_preexec\" /bin/true"],
+          :requires => 'Augeas[test_share-section]',
+          :notify   => 'Class[Samba::Server::Service]')
         }
       end#no params