Separate apt::pin for apt::backports to allow pin by release instead of origin
[puppet-modules/puppetlabs-apt.git] / spec / classes / apt_spec.rb
index 2c70e3e0901258b106a7c42e940131b35acf5e1c..0a1c0a1bd79e4a62cfd2472337fae3b31800949b 100644 (file)
@@ -37,6 +37,14 @@ describe 'apt', :type => :class do
       'notify' => 'Exec[apt_update]',
     })}
 
+    it 'should lay down /etc/apt/apt.conf.d/15update-stamp' do
+      should contain_file('/etc/apt/apt.conf.d/15update-stamp').with({
+        'group' => 'root',
+        'mode'  => '0644',
+        'owner' => 'root',
+      }).with_content('APT::Update::Post-Invoke-Success {"touch /var/lib/apt/periodic/update-success-stamp 2>/dev/null || true";};')
+    end
+
     it { should contain_file('old-proxy-file').that_notifies('Exec[apt_update]').only_with({
       'ensure' => 'absent',
       'path'   => '/etc/apt/apt.conf.d/proxy',