(GH-iac-334) Remove code specific to unsupported OSs
authordavid22swan <david.swan@puppet.com>
Thu, 24 Mar 2022 16:33:31 +0000 (16:33 +0000)
committerdavid22swan <david.swan@puppet.com>
Thu, 24 Mar 2022 16:34:05 +0000 (16:34 +0000)
Code removed includes ubuntu 16.04 + 14.04 and Debian 7 + 8

26 files changed:
manifests/params.pp
manifests/source.pp
provision.yaml
spec/acceptance/apt_key_provider_spec.rb
spec/classes/apt_backports_spec.rb
spec/classes/apt_spec.rb
spec/classes/apt_update_spec.rb
spec/defines/conf_spec.rb
spec/defines/key_compat_spec.rb
spec/defines/key_spec.rb
spec/defines/mark_spec.rb
spec/defines/pin_spec.rb
spec/defines/ppa_spec.rb
spec/defines/setting_spec.rb
spec/defines/source_compat_spec.rb
spec/defines/source_spec.rb
spec/unit/facter/apt_dist_has_updates_spec.rb
spec/unit/facter/apt_dist_package_security_updates_spec.rb
spec/unit/facter/apt_dist_package_updates_spec.rb
spec/unit/facter/apt_dist_security_updates_spec.rb
spec/unit/facter/apt_dist_updates_spec.rb
spec/unit/facter/apt_has_updates_spec.rb
spec/unit/facter/apt_package_security_updates_spec.rb
spec/unit/facter/apt_package_updates_spec.rb
spec/unit/facter/apt_security_updates_spec.rb
spec/unit/facter/apt_updates_spec.rb

index 58ce9ed2831939e848e543200610a6b171169b07..ae656dbf8f7fde2a8eb5f8c0b94cacf1b629661b 100644 (file)
@@ -84,11 +84,7 @@ class apt::params {
           }
       $ppa_options = undef
       $ppa_package = undef
-      if versioncmp($facts['os']['release']['major'], '9') >= 0 {
-        $auth_conf_owner = '_apt'
-      } else {
-        $auth_conf_owner = 'root'
-      }
+      $auth_conf_owner = '_apt'
     }
     'Ubuntu': {
       $backports = {
@@ -98,11 +94,7 @@ class apt::params {
       }
       $ppa_options        = '-y'
       $ppa_package        = 'software-properties-common'
-      if versioncmp($facts['os']['release']['full'], '16.04') >= 0 {
-        $auth_conf_owner = '_apt'
-      } else {
-        $auth_conf_owner = 'root'
-      }
+      $auth_conf_owner = '_apt'
     }
     undef: {
       fail('Unable to determine value for fact os[\"name\"]')
index da01ef1319e1c33244b72d80844511a7d249949e..b24aa346852dc5435d1d3c4011d32a5b7d290a59 100644 (file)
@@ -99,7 +99,7 @@ define apt::source(
       $_location = $location
     }
     # Newer oses, do not need the package for HTTPS transport.
-    $_transport_https_releases = [ '7', '8', '9', '14.04', '16.04' ]
+    $_transport_https_releases = ['9']
     if (fact('os.release.major') in $_transport_https_releases) and $_location =~ /(?i:^https:\/\/)/ {
       ensure_packages('apt-transport-https')
       Package['apt-transport-https'] -> Class['apt::update']
@@ -111,7 +111,7 @@ define apt::source(
   $includes = merge($::apt::include_defaults, $include)
 
   if $key and $keyring {
-    fail("parameters key and keyring are mutualy exclusive")
+    fail('parameters key and keyring are mutualy exclusive')
   }
 
   if $key {
@@ -138,8 +138,8 @@ define apt::source(
     'includes'         => $includes,
     'options'          => delete_undef_values({
       'arch'           => $architecture,
-      'trusted'        => $allow_unsigned ? {true => "yes", false => undef},
-      'allow-insecure' => $allow_insecure ? {true => "yes", false => undef},
+      'trusted'        => $allow_unsigned ? {true => 'yes', false => undef},
+      'allow-insecure' => $allow_insecure ? {true => 'yes', false => undef},
       'signed-by'      => $keyring,
     }),
     'location'         => $_location,
index d3ef67b3cf5ba62008f1c26a1357b6388a24873c..144e28bd2089862d0a4e21e406b0e4037a8a305a 100644 (file)
@@ -2,7 +2,7 @@
 default:
   provisioner: docker
   images:
-  - litmusimage/debian:8
+  - litmusimage/debian:9
 vagrant:
   provisioner: vagrant
   images:
@@ -16,7 +16,6 @@ travis_deb:
 travis_ub_6:
   provisioner: docker
   images:
-  - litmusimage/ubuntu:16.04
   - litmusimage/ubuntu:18.04
   - litmusimage/ubuntu:20.04
 travis_el7:
@@ -25,11 +24,8 @@ travis_el7:
 release_checks_6:
   provisioner: abs
   images:
-  - debian-8-x86_64
   - debian-9-x86_64
   - debian-10-x86_64
-  - ubuntu-1404-x86_64
-  - ubuntu-1604-x86_64
   - ubuntu-1804-x86_64
   - ubuntu-2004-x86_64
 release_checks_7:
index 0db1d32ae3d014002b982fbc3f007be5ba5f729e..ee4a4c8242ee196c508d4cf114b708d45771328a 100644 (file)
@@ -18,8 +18,7 @@ SHOULD_NEVER_EXIST_ID               = 'EF8D349F'
 KEY_CHECK_COMMAND                   = 'apt-key adv --no-tty --list-keys --with-colons --fingerprint | grep '
 PUPPETLABS_KEY_CHECK_COMMAND        = "#{KEY_CHECK_COMMAND} #{PUPPETLABS_GPG_KEY_FINGERPRINT}"
 CENTOS_KEY_CHECK_COMMAND            = "#{KEY_CHECK_COMMAND} #{CENTOS_GPG_KEY_FINGERPRINT}"
-PUPPETLABS_EXP_CHECK_COMMAND        = "#{KEY_CHECK_COMMAND} '#{PUPPETLABS_EXP_KEY_DATES}'"
-DEBIAN_PUPPETLABS_EXP_CHECK_COMMAND = 'apt-key list | grep -F -A 1 \'pub   rsa4096 2010-07-10 [SC] [expired: 2017-01-05]\' | grep \'47B3 20EB 4C7C 375A A9DA  E1A0 1054 B7A2 4BD6 EC30\''
+PUPPETLABS_EXP_CHECK_COMMAND        = 'apt-key list | grep -F -A 1 \'pub   rsa4096 2010-07-10 [SC] [expired: 2017-01-05]\' | grep \'47B3 20EB 4C7C 375A A9DA  E1A0 1054 B7A2 4BD6 EC30\''
 
 def install_key(key)
   retry_on_error_matching do
@@ -890,17 +889,9 @@ describe 'apt_key' do
   end
 
   describe 'refresh' do
-    if ['8', '14.04', '16.04'].include?(host_inventory['facter']['os']['release']['major'])
-      # older OSes use puppetlabs_exp_check_command
-      let(:puppetlabs_exp_check_command) { PUPPETLABS_EXP_CHECK_COMMAND }
+    # Ensure dirmngr package is installed
+    apply_manifest(refresh_check_for_dirmngr_pp, acceptable_exit_codes: [0, 2])
 
-    else
-      # Set Debian Stetch and newer OSes puppetlabs_exp_check_command
-      let(:puppetlabs_exp_check_command) { DEBIAN_PUPPETLABS_EXP_CHECK_COMMAND }
-
-      # Ensure dirmngr package is installed
-      apply_manifest(refresh_check_for_dirmngr_pp, acceptable_exit_codes: [0, 2])
-    end
     before(:each) do
       # Delete the Puppet Labs Release Key and install an expired version of the key
       apply_manifest(refresh_del_key_pp)
@@ -910,14 +901,14 @@ describe 'apt_key' do
       it 'updates an expired key' do
         apply_manifest(refresh_true_pp)
         # Check key has been updated to new version
-        run_shell(puppetlabs_exp_check_command.to_s)
+        run_shell(PUPPETLABS_EXP_CHECK_COMMAND.to_s)
       end
     end
     context 'when refresh => false' do
       it 'does not replace an expired key' do
         apply_manifest(refresh_false_pp)
         # Expired key is present and has not been updated by the new version
-        run_shell(puppetlabs_exp_check_command.to_s, expect_failures: true)
+        run_shell(PUPPETLABS_EXP_CHECK_COMMAND.to_s, expect_failures: true)
       end
     end
   end
index 2f3865bc32c8ade2aaa27c97791c77b80e45897e..6f6d5309217c2129edd665dd24fdbae098fa80c5 100644 (file)
@@ -13,11 +13,11 @@ describe 'apt::backports', type: :class do
             family: 'Debian',
             name: 'Debian',
             release: {
-              major: '8',
-              full: '8.0',
+              major: '9',
+              full: '9.0',
             },
             distro: {
-              codename: 'jessie',
+              codename: 'stretch',
               id: 'Debian',
             },
           },
@@ -27,8 +27,8 @@ describe 'apt::backports', type: :class do
       it {
         is_expected.to contain_apt__source('backports').with(location: 'http://deb.debian.org/debian',
                                                              repos: 'main contrib non-free',
-                                                             release: 'jessie-backports',
-                                                             pin: { 'priority' => 200, 'release' => 'jessie-backports' })
+                                                             release: 'stretch-backports',
+                                                             pin: { 'priority' => 200, 'release' => 'stretch-backports' })
       }
     end
     context 'with defaults on ubuntu' do
@@ -38,11 +38,11 @@ describe 'apt::backports', type: :class do
             family: 'Debian',
             name: 'Ubuntu',
             release: {
-              major: '16',
-              full: '16.04',
+              major: '18',
+              full: '18.04',
             },
             distro: {
-              codename: 'xenial',
+              codename: 'bionac',
               id: 'Ubuntu',
             },
           },
@@ -53,8 +53,8 @@ describe 'apt::backports', type: :class do
         is_expected.to contain_apt__source('backports').with(location: 'http://archive.ubuntu.com/ubuntu',
                                                              key: '630239CC130E1A7FD81A27B140976EAF437D05B5',
                                                              repos: 'main universe multiverse restricted',
-                                                             release: 'xenial-backports',
-                                                             pin: { 'priority' => 200, 'release' => 'xenial-backports' })
+                                                             release: 'bionac-backports',
+                                                             pin: { 'priority' => 200, 'release' => 'bionac-backports' })
       }
     end
     context 'with everything set' do
@@ -64,11 +64,11 @@ describe 'apt::backports', type: :class do
             family: 'Debian',
             name: 'Ubuntu',
             release: {
-              major: '16',
-              full: '16.04',
+              major: '18',
+              full: '18.04',
             },
             distro: {
-              codename: 'xenial',
+              codename: 'bionac',
               id: 'Ubuntu',
             },
           },
@@ -99,11 +99,11 @@ describe 'apt::backports', type: :class do
             family: 'Debian',
             name: 'Ubuntu',
             release: {
-              major: '16',
-              full: '16.04',
+              major: '18',
+              full: '18.04',
             },
             distro: {
-              codename: 'xenial',
+              codename: 'bionac',
               id: 'Ubuntu',
             },
           },
@@ -222,11 +222,11 @@ describe 'apt::backports', type: :class do
           family: 'Debian',
           name: 'Ubuntu',
           release: {
-            major: '16',
-            full: '16.04',
+            major: '18',
+            full: '18.04',
           },
           distro: {
-            codename: 'xenial',
+            codename: 'bionac',
             id: 'Ubuntu',
           },
         },
index 03b638ca7fbd1406ae1888578d8c2317d58e3738..1a7513c44a1113f2101e7be2061e98eefbae96d9 100644 (file)
@@ -45,11 +45,11 @@ describe 'apt' do
         family: 'Debian',
         name: 'Debian',
         release: {
-          major: '8',
-          full: '8.0',
+          major: '9',
+          full: '9.0',
         },
         distro: {
-          codename: 'jessie',
+          codename: 'stretch',
           id: 'Debian',
         },
       },
@@ -342,34 +342,6 @@ describe 'apt' do
 
   context 'with entries for /etc/apt/auth.conf' do
     facts_hash = {
-      'Ubuntu 14.04' => {
-        os: {
-          family: 'Debian',
-          name: 'Ubuntu',
-          release: {
-            major: '14',
-            full: '14.04',
-          },
-          distro: {
-            codename: 'trusty',
-            id: 'Ubuntu',
-          },
-        },
-      },
-      'Ubuntu 16.04' => {
-        os: {
-          family: 'Debian',
-          name: 'Ubuntu',
-          release: {
-            major: '16',
-            full: '16.04',
-          },
-          distro: {
-            codename: 'xenial',
-            id: 'Ubuntu',
-          },
-        },
-      },
       'Ubuntu 18.04' => {
         os: {
           family: 'Debian',
@@ -384,34 +356,6 @@ describe 'apt' do
           },
         },
       },
-      'Debian 7.0' => {
-        os: {
-          family: 'Debian',
-          name: 'Debian',
-          release: {
-            major: '7',
-            full: '7.0',
-          },
-          distro: {
-            codename: 'wheezy',
-            id: 'Debian',
-          },
-        },
-      },
-      'Debian 8.0' => {
-        os: {
-          family: 'Debian',
-          name: 'Debian',
-          release: {
-            major: '8',
-            full: '8.0',
-          },
-          distro: {
-            codename: 'jessie',
-            id: 'Debian',
-          },
-        },
-      },
       'Debian 9.0' => {
         os: {
           family: 'Debian',
@@ -469,16 +413,6 @@ describe 'apt' do
             super().merge(manage_auth_conf: true)
           end
 
-          # Going forward starting with Ubuntu 16.04 and Debian 9.0
-          # /etc/apt/auth.conf is owned by _apt. In previous versions it is
-          # root.
-          auth_conf_owner = case os
-                            when 'Ubuntu 14.04', 'Debian 7.0', 'Debian 8.0'
-                              'root'
-                            else
-                              '_apt'
-                            end
-
           auth_conf_content = "// This file is managed by Puppet. DO NOT EDIT.
 machine deb.example.net login foologin password secret
 machine apt.example.com login aptlogin password supersecret
@@ -486,7 +420,7 @@ machine apt.example.com login aptlogin password supersecret
 
           it {
             is_expected.to contain_file('/etc/apt/auth.conf').with(ensure: 'present',
-                                                                   owner: auth_conf_owner,
+                                                                   owner: '_apt',
                                                                    group: 'root',
                                                                    mode: '0600',
                                                                    notify: 'Class[Apt::Update]',
@@ -535,11 +469,11 @@ machine apt.example.com login aptlogin password supersecret
           family: 'Debian',
           name: 'Ubuntu',
           release: {
-            major: '16',
-            full: '16.04',
+            major: '18',
+            full: '18.04',
           },
           distro: {
-            codename: 'xenial',
+            codename: 'bionic',
             id: 'Ubuntu',
           },
         },
@@ -574,7 +508,7 @@ machine apt.example.com login aptlogin password supersecret
       is_expected.to contain_apt__setting('list-puppetlabs').with(ensure: 'present')
     }
 
-    it { is_expected.to contain_file('/etc/apt/sources.list.d/puppetlabs.list').with_content(%r{^deb http://apt.puppetlabs.com xenial main$}) }
+    it { is_expected.to contain_file('/etc/apt/sources.list.d/puppetlabs.list').with_content(%r{^deb http://apt.puppetlabs.com bionic main$}) }
   end
 
   context 'with confs defined on valid os.family' do
@@ -584,11 +518,11 @@ machine apt.example.com login aptlogin password supersecret
           family: 'Debian',
           name: 'Ubuntu',
           release: {
-            major: '16',
-            full: '16.04',
+            major: '18',
+            full: '18.04',
           },
           distro: {
-            codename: 'xenial',
+            codename: 'bionic',
             id: 'Ubuntu',
           },
         },
@@ -621,11 +555,11 @@ machine apt.example.com login aptlogin password supersecret
           family: 'Debian',
           name: 'Ubuntu',
           release: {
-            major: '16',
-            full: '16.04',
+            major: '18',
+            full: '18.04',
           },
           distro: {
-            codename: 'xenial',
+            codename: 'bionic',
             id: 'Ubuntu',
           },
         },
@@ -658,11 +592,11 @@ machine apt.example.com login aptlogin password supersecret
           family: 'Debian',
           name: 'Ubuntu',
           release: {
-            major: '16',
-            full: '16.04',
+            major: '18',
+            full: '18.04',
           },
           distro: {
-            codename: 'xenial',
+            codename: 'bionic',
             id: 'Ubuntu',
           },
         },
@@ -686,11 +620,11 @@ machine apt.example.com login aptlogin password supersecret
           family: 'Debian',
           name: 'Ubuntu',
           release: {
-            major: '16',
-            full: '16.04',
+            major: '18',
+            full: '18.04',
           },
           distro: {
-            codename: 'xenial',
+            codename: 'bionic',
             id: 'Ubuntu',
           },
         },
@@ -714,11 +648,11 @@ machine apt.example.com login aptlogin password supersecret
           family: 'Debian',
           name: 'Ubuntu',
           release: {
-            major: '16',
-            full: '16.04',
+            major: '18',
+            full: '18.04',
           },
           distro: {
-            codename: 'xenial',
+            codename: 'bionic',
             id: 'Ubuntu',
           },
         },
index 89ba942aac702dd2dd9f5d5e970db97c7fd5e1e0..0db9a470b20394edea2b7e8cb9f78dd7e88877e0 100644 (file)
@@ -16,11 +16,11 @@ describe 'apt::update', type: :class do
               family: 'Debian',
               name: 'Debian',
               release: {
-                major: '8',
-                full: '8.0',
+                major: '9',
+                full: '9.0',
               },
               distro: {
-                codename: 'jessie',
+                codename: 'stretch',
                 id: 'Debian',
               },
             },
@@ -44,11 +44,11 @@ describe 'apt::update', type: :class do
             family: 'Debian',
             name: 'Debian',
             release: {
-              major: '8',
-              full: '8.0',
+              major: '9',
+              full: '9.0',
             },
             distro: {
-              codename: 'jessie',
+              codename: 'stretch',
               id: 'Debian',
             },
           },
@@ -68,11 +68,11 @@ describe 'apt::update', type: :class do
             family: 'Debian',
             name: 'Debian',
             release: {
-              major: '8',
-              full: '8.0',
+              major: '9',
+              full: '9.0',
             },
             distro: {
-              codename: 'jessie',
+              codename: 'stretch',
               id: 'Debian',
             },
           },
@@ -105,11 +105,11 @@ describe 'apt::update', type: :class do
               family: 'Debian',
               name: 'Debian',
               release: {
-                major: '8',
-                full: '8.0',
+                major: '9',
+                full: '9.0',
               },
               distro: {
-                codename: 'jessie',
+                codename: 'stretch',
                 id: 'Debian',
               },
             },
@@ -131,11 +131,11 @@ describe 'apt::update', type: :class do
             family: 'Debian',
             name: 'Debian',
             release: {
-              major: '8',
-              full: '8.0',
+              major: '9',
+              full: '9.0',
             },
             distro: {
-              codename: 'jessie',
+              codename: 'stretch',
               id: 'Debian',
             },
           },
@@ -159,11 +159,11 @@ describe 'apt::update', type: :class do
                 family: 'Debian',
                 name: 'Debian',
                 release: {
-                  major: '8',
-                  full: '8.0',
+                  major: '9',
+                  full: '9.0',
                 },
                 distro: {
-                  codename: 'jessie',
+                  codename: 'stretch',
                   id: 'Debian',
                 },
               },
@@ -185,11 +185,11 @@ describe 'apt::update', type: :class do
               family: 'Debian',
               name: 'Debian',
               release: {
-                major: '8',
-                full: '8.0',
+                major: '9',
+                full: '9.0',
               },
               distro: {
-                codename: 'jessie',
+                codename: 'stretch',
                 id: 'Debian',
               },
             },
@@ -210,11 +210,11 @@ describe 'apt::update', type: :class do
               family: 'Debian',
               name: 'Debian',
               release: {
-                major: '8',
-                full: '8.0',
+                major: '9',
+                full: '9.0',
               },
               distro: {
-                codename: 'jessie',
+                codename: 'stretch',
                 id: 'Debian',
               },
             },
index 310e15ad5e67a20d41964b001cadf353949dd500..f1e42b5f674571213aeb3872c56972b2e1846ad6 100644 (file)
@@ -11,11 +11,11 @@ describe 'apt::conf', type: :define do
         family: 'Debian',
         name: 'Debian',
         release: {
-          major: '8',
-          full: '8.0',
+          major: '9',
+          full: '9.0',
         },
         distro: {
-          codename: 'jessie',
+          codename: 'stretch',
           id: 'Debian',
         },
       },
index e2a76e0b00e8f6feeaee643daa3d5d9e618ce345..d4779375521036c9feb8b77ce3a386f318eca4ec 100644 (file)
@@ -29,11 +29,11 @@ describe 'apt::key', type: :define do
         family: 'Debian',
         name: 'Debian',
         release: {
-          major: '8',
-          full: '8.0',
+          major: '9',
+          full: '9.0',
         },
         distro: {
-          codename: 'jessie',
+          codename: 'stretch',
           id: 'Debian',
         },
       },
index fc40a8632d89399a15e4c80a8bb6ca70e7253bae..fd63965f7b324f2c2a3b962ea3d9194e607d1374 100644 (file)
@@ -50,11 +50,11 @@ describe 'apt::key' do
         family: 'Debian',
         name: 'Debian',
         release: {
-          major: '8',
-          full: '8.0',
+          major: '9',
+          full: '9.0',
         },
         distro: {
-          codename: 'jessie',
+          codename: 'stretch',
           id: 'Debian',
         },
       },
index 0d059a51732c7ab05473a18f24fd8c3119b8dfdd..b451bedd30673e20813b4519a91619a49e40c174 100644 (file)
@@ -13,11 +13,11 @@ describe 'apt::mark', type: :define do
         family: 'Debian',
         name: 'Debian',
         release: {
-          major: '8',
-          full: '8.0',
+          major: '9',
+          full: '9.0',
         },
         distro: {
-          codename: 'jessie',
+          codename: 'stretch',
           id: 'Debian',
         },
       },
index 1b6ac33c28f629eac360d7468114c08ab8b9a39f..5edc79cc6dd2f1888b3387c7c60f0148a653b9a7 100644 (file)
@@ -11,11 +11,11 @@ describe 'apt::pin', type: :define do
         family: 'Debian',
         name: 'Debian',
         release: {
-          major: '8',
-          full: '8.0',
+          major: '9',
+          full: '9.0',
         },
         distro: {
-          codename: 'jessie',
+          codename: 'stretch',
           id: 'Debian',
         },
       },
index 43ee7541d712d6663f9c68ed33ee50172bf34603..b5aadff31a5e211994c6a3eea770989b6d870357 100644 (file)
@@ -13,8 +13,8 @@ describe 'apt::ppa' do
           family: 'Debian',
           name: 'Ubuntu',
           release: {
-            major: '14',
-            full: '14.04',
+            major: '18',
+            full: '18.04',
           },
           distro: {
             codename: 'trusty',
@@ -29,8 +29,8 @@ describe 'apt::ppa' do
     it { is_expected.not_to contain_package('python-software-properties') }
     it {
       is_expected.to contain_exec('add-apt-repository-ppa:needs/such.substitution/wow+type').that_notifies('Class[Apt::Update]').with(environment: [],
-                                                                                                                                      command: '/usr/bin/add-apt-repository -y ppa:needs/such.substitution/wow+type || (rm /etc/apt/sources.list.d/needs-such_substitution-wow_type-trusty.list && false)', # rubocop:disable Layout/LineLength
-                                                                                                                                      unless: '/usr/bin/test -f /etc/apt/sources.list.d/needs-such_substitution-wow_type-trusty.list && /usr/bin/test -f /etc/apt/trusted.gpg.d/needs-such_substitution-wow_type.gpg', # rubocop:disable Layout/LineLength
+                                                                                                                                      command: '/usr/bin/add-apt-repository -y ppa:needs/such.substitution/wow+type || (rm /etc/apt/sources.list.d/needs-ubuntu-such_substitution-wow_type-trusty.list && false)', # rubocop:disable Layout/LineLength
+                                                                                                                                      unless: '/usr/bin/test -f /etc/apt/sources.list.d/needs-ubuntu-such_substitution-wow_type-trusty.list && /usr/bin/test -f /etc/apt/trusted.gpg.d/needs_ubuntu_such_substitution-wow_type.gpg', # rubocop:disable Layout/LineLength
                                                                                                                                       user: 'root',
                                                                                                                                       logoutput: 'on_failure')
     }
@@ -81,8 +81,8 @@ describe 'apt::ppa' do
           family: 'Debian',
           name: 'Ubuntu',
           release: {
-            major: '14',
-            full: '14.04',
+            major: '18',
+            full: '18.04',
           },
           distro: {
             codename: 'trusty',
@@ -97,14 +97,14 @@ describe 'apt::ppa' do
     it { is_expected.to contain_package('software-properties-common') }
     it {
       is_expected.to contain_exec('add-apt-repository-ppa:needs/such.substitution/wow').that_notifies('Class[Apt::Update]').with('environment' => [],
-                                                                                                                                 'command'     => '/usr/bin/add-apt-repository -y ppa:needs/such.substitution/wow || (rm /etc/apt/sources.list.d/needs-such_substitution-wow-trusty.list && false)', # rubocop:disable Layout/LineLength
-                                                                                                                                 'unless'      => '/usr/bin/test -f /etc/apt/sources.list.d/needs-such_substitution-wow-trusty.list && /usr/bin/test -f /etc/apt/trusted.gpg.d/needs-such_substitution-wow.gpg', # rubocop:disable Layout/LineLength
+                                                                                                                                 'command'     => '/usr/bin/add-apt-repository -y ppa:needs/such.substitution/wow || (rm /etc/apt/sources.list.d/needs-ubuntu-such_substitution-wow-trusty.list && false)', # rubocop:disable Layout/LineLength
+                                                                                                                                 'unless'      => '/usr/bin/test -f /etc/apt/sources.list.d/needs-ubuntu-such_substitution-wow-trusty.list && /usr/bin/test -f /etc/apt/trusted.gpg.d/needs_ubuntu_such_substitution-wow.gpg', # rubocop:disable Layout/LineLength
                                                                                                                                  'user'        => 'root',
                                                                                                                                  'logoutput'   => 'on_failure')
     }
 
     it {
-      is_expected.to contain_file('/etc/apt/sources.list.d/needs-such_substitution-wow-trusty.list').that_requires('Exec[add-apt-repository-ppa:needs/such.substitution/wow]').with('ensure' => 'file')
+      is_expected.to contain_file('/etc/apt/sources.list.d/needs-ubuntu-such_substitution-wow-trusty.list').that_requires('Exec[add-apt-repository-ppa:needs/such.substitution/wow]').with('ensure' => 'file') # rubocop:disable Layout/LineLength
     }
   end
 
@@ -118,8 +118,8 @@ describe 'apt::ppa' do
           family: 'Debian',
           name: 'Ubuntu',
           release: {
-            major: '14',
-            full: '14.04',
+            major: '18',
+            full: '18.04',
           },
           distro: {
             codename: 'trusty',
@@ -139,14 +139,14 @@ describe 'apt::ppa' do
     it { is_expected.not_to contain_package('python-software-properties') }
     it {
       is_expected.to contain_exec('add-apt-repository-ppa:needs/such.substitution/wow').that_notifies('Class[Apt::Update]').with('environment' => [],
-                                                                                                                                 'command'     => '/usr/bin/add-apt-repository -y ppa:needs/such.substitution/wow || (rm /etc/apt/sources.list.d/needs-such_substitution-wow-trusty.list && false)', # rubocop:disable Layout/LineLength
-                                                                                                                                 'unless'      => '/usr/bin/test -f /etc/apt/sources.list.d/needs-such_substitution-wow-trusty.list && /usr/bin/test -f /etc/apt/trusted.gpg.d/needs-such_substitution-wow.gpg', # rubocop:disable Layout/LineLength
+                                                                                                                                 'command'     => '/usr/bin/add-apt-repository -y ppa:needs/such.substitution/wow || (rm /etc/apt/sources.list.d/needs-ubuntu-such_substitution-wow-trusty.list && false)', # rubocop:disable Layout/LineLength
+                                                                                                                                 'unless'      => '/usr/bin/test -f /etc/apt/sources.list.d/needs-ubuntu-such_substitution-wow-trusty.list && /usr/bin/test -f /etc/apt/trusted.gpg.d/needs_ubuntu_such_substitution-wow.gpg', # rubocop:disable Layout/LineLength
                                                                                                                                  'user'        => 'root',
                                                                                                                                  'logoutput'   => 'on_failure')
     }
 
     it {
-      is_expected.to contain_file('/etc/apt/sources.list.d/needs-such_substitution-wow-trusty.list').that_requires('Exec[add-apt-repository-ppa:needs/such.substitution/wow]').with('ensure' => 'file')
+      is_expected.to contain_file('/etc/apt/sources.list.d/needs-ubuntu-such_substitution-wow-trusty.list').that_requires('Exec[add-apt-repository-ppa:needs/such.substitution/wow]').with('ensure' => 'file') # rubocop:disable Layout/LineLength
     }
   end
 
@@ -162,8 +162,8 @@ describe 'apt::ppa' do
           family: 'Debian',
           name: 'Ubuntu',
           release: {
-            major: '14',
-            full: '14.04',
+            major: '18',
+            full: '18.04',
           },
           distro: {
             codename: 'trusty',
@@ -185,8 +185,8 @@ describe 'apt::ppa' do
     it { is_expected.to contain_package('software-properties-common') }
     it {
       is_expected.to contain_exec('add-apt-repository-ppa:user/foo').that_notifies('Class[Apt::Update]').with(environment: [],
-                                                                                                              command: '/usr/bin/add-apt-repository  ppa:user/foo || (rm /etc/apt/sources.list.d/user-foo-trusty.list && false)', # rubocop:disable Layout/LineLength
-                                                                                                              unless: '/usr/bin/test -f /etc/apt/sources.list.d/user-foo-trusty.list && /usr/bin/test -f /etc/apt/trusted.gpg.d/user-foo.gpg', # rubocop:disable Layout/LineLength
+                                                                                                              command: '/usr/bin/add-apt-repository  ppa:user/foo || (rm /etc/apt/sources.list.d/user-ubuntu-foo-trusty.list && false)', # rubocop:disable Layout/LineLength
+                                                                                                              unless: '/usr/bin/test -f /etc/apt/sources.list.d/user-ubuntu-foo-trusty.list && /usr/bin/test -f /etc/apt/trusted.gpg.d/user_ubuntu_foo.gpg', # rubocop:disable Layout/LineLength
                                                                                                               user: 'root',
                                                                                                               logoutput: 'on_failure')
     }
@@ -204,8 +204,8 @@ describe 'apt::ppa' do
           family: 'Debian',
           name: 'Ubuntu',
           release: {
-            major: '14',
-            full: '14.04',
+            major: '18',
+            full: '18.04',
           },
           distro: {
             codename: 'trusty',
@@ -225,8 +225,8 @@ describe 'apt::ppa' do
     it { is_expected.to contain_package('software-properties-common') }
     it {
       is_expected.to contain_exec('add-apt-repository-ppa:user/foo').that_notifies('Class[Apt::Update]').with(environment: ['http_proxy=http://localhost:8080'],
-                                                                                                              command: '/usr/bin/add-apt-repository  ppa:user/foo || (rm /etc/apt/sources.list.d/user-foo-trusty.list && false)', # rubocop:disable Layout/LineLength
-                                                                                                              unless: '/usr/bin/test -f /etc/apt/sources.list.d/user-foo-trusty.list && /usr/bin/test -f /etc/apt/trusted.gpg.d/user-foo.gpg', # rubocop:disable Layout/LineLength
+                                                                                                              command: '/usr/bin/add-apt-repository  ppa:user/foo || (rm /etc/apt/sources.list.d/user-ubuntu-foo-trusty.list && false)', # rubocop:disable Layout/LineLength
+                                                                                                              unless: '/usr/bin/test -f /etc/apt/sources.list.d/user-ubuntu-foo-trusty.list && /usr/bin/test -f /etc/apt/trusted.gpg.d/user_ubuntu_foo.gpg', # rubocop:disable Layout/LineLength
                                                                                                               user: 'root',
                                                                                                               logoutput: 'on_failure')
     }
@@ -244,8 +244,8 @@ describe 'apt::ppa' do
           family: 'Debian',
           name: 'Ubuntu',
           release: {
-            major: '14',
-            full: '14.04',
+            major: '18',
+            full: '18.04',
           },
           distro: {
             codename: 'trusty',
@@ -265,8 +265,8 @@ describe 'apt::ppa' do
     it { is_expected.to contain_package('software-properties-common') }
     it {
       is_expected.to contain_exec('add-apt-repository-ppa:user/foo').that_notifies('Class[Apt::Update]').with(environment: ['http_proxy=http://localhost:8180'],
-                                                                                                              command: '/usr/bin/add-apt-repository  ppa:user/foo || (rm /etc/apt/sources.list.d/user-foo-trusty.list && false)', # rubocop:disable Layout/LineLength
-                                                                                                              unless: '/usr/bin/test -f /etc/apt/sources.list.d/user-foo-trusty.list && /usr/bin/test -f /etc/apt/trusted.gpg.d/user-foo.gpg', # rubocop:disable Layout/LineLength
+                                                                                                              command: '/usr/bin/add-apt-repository  ppa:user/foo || (rm /etc/apt/sources.list.d/user-ubuntu-foo-trusty.list && false)', # rubocop:disable Layout/LineLength
+                                                                                                              unless: '/usr/bin/test -f /etc/apt/sources.list.d/user-ubuntu-foo-trusty.list && /usr/bin/test -f /etc/apt/trusted.gpg.d/user_ubuntu_foo.gpg', # rubocop:disable Layout/LineLength
                                                                                                               user: 'root',
                                                                                                               logoutput: 'on_failure')
     }
@@ -284,8 +284,8 @@ describe 'apt::ppa' do
           family: 'Debian',
           name: 'Ubuntu',
           release: {
-            major: '14',
-            full: '14.04',
+            major: '18',
+            full: '18.04',
           },
           distro: {
             codename: 'trusty',
@@ -305,8 +305,8 @@ describe 'apt::ppa' do
     it { is_expected.to contain_package('software-properties-common') }
     it {
       is_expected.to contain_exec('add-apt-repository-ppa:user/foo').that_notifies('Class[Apt::Update]').with(environment: ['http_proxy=http://localhost:8180', 'https_proxy=https://localhost:8180'],
-                                                                                                              command: '/usr/bin/add-apt-repository  ppa:user/foo || (rm /etc/apt/sources.list.d/user-foo-trusty.list && false)', # rubocop:disable Layout/LineLength
-                                                                                                              unless: '/usr/bin/test -f /etc/apt/sources.list.d/user-foo-trusty.list && /usr/bin/test -f /etc/apt/trusted.gpg.d/user-foo.gpg', # rubocop:disable Layout/LineLength
+                                                                                                              command: '/usr/bin/add-apt-repository  ppa:user/foo || (rm /etc/apt/sources.list.d/user-ubuntu-foo-trusty.list && false)', # rubocop:disable Layout/LineLength
+                                                                                                              unless: '/usr/bin/test -f /etc/apt/sources.list.d/user-ubuntu-foo-trusty.list && /usr/bin/test -f /etc/apt/trusted.gpg.d/user_ubuntu_foo.gpg', # rubocop:disable Layout/LineLength
                                                                                                               user: 'root',
                                                                                                               logoutput: 'on_failure')
     }
@@ -322,8 +322,8 @@ describe 'apt::ppa' do
           family: 'Debian',
           name: 'Ubuntu',
           release: {
-            major: '14',
-            full: '14.04',
+            major: '18',
+            full: '18.04',
           },
           distro: {
             codename: 'trusty',
@@ -340,7 +340,7 @@ describe 'apt::ppa' do
     end
 
     it {
-      is_expected.to contain_file('/etc/apt/sources.list.d/user-foo-trusty.list').that_notifies('Class[Apt::Update]').with(ensure: 'absent')
+      is_expected.to contain_file('/etc/apt/sources.list.d/user-ubuntu-foo-trusty.list').that_notifies('Class[Apt::Update]').with(ensure: 'absent')
     }
   end
 
@@ -352,8 +352,8 @@ describe 'apt::ppa' do
             family: 'Debian',
             name: 'Ubuntu',
             release: {
-              major: '14',
-              full: '14.04',
+              major: '18',
+              full: '18.04',
             },
             distro: {
               codename: nil,
index a2fef2e24a2c48fb82c32b0c54f1b59c9960426b..97ebdc4658e138da356953c454d1fbd12cf74067 100644 (file)
@@ -10,11 +10,11 @@ describe 'apt::setting' do
         family: 'Debian',
         name: 'Debian',
         release: {
-          major: '8',
-          full: '8.0',
+          major: '9',
+          full: '9.0',
         },
         distro: {
-          codename: 'jessie',
+          codename: 'stretch',
           id: 'Debian',
         },
       },
@@ -86,11 +86,11 @@ describe 'apt::setting' do
           family: 'Debian',
           name: 'Debian',
           release: {
-            major: '8',
-            full: '8.0',
+            major: '9',
+            full: '9.0',
           },
           distro: {
-            codename: 'jessie',
+            codename: 'stretch',
             id: 'Debian',
           },
         },
index bd54fcfd1faaf0392c09f789ed58285a5e79558e..d7dfb7869564b5a49c7f54e07c754cc14f91cf46 100644 (file)
@@ -15,11 +15,11 @@ describe 'apt::source', type: :define do
         family: 'Debian',
         name: 'Debian',
         release: {
-          major: '8',
-          full: '8.0',
+          major: '9',
+          full: '9.0',
         },
         distro: {
-          codename: 'jessie',
+          codename: 'stretch',
           id: 'Debian',
         },
       },
@@ -35,7 +35,7 @@ describe 'apt::source', type: :define do
     end
 
     it {
-      is_expected.to contain_apt__setting('list-my_source').with_content(%r{# my_source\ndeb-src http://debian.mirror.iweb.ca/debian/ jessie main\n})
+      is_expected.to contain_apt__setting('list-my_source').with_content(%r{# my_source\ndeb-src http://debian.mirror.iweb.ca/debian/ stretch main\n})
     }
   end
 
@@ -80,7 +80,7 @@ describe 'apt::source', type: :define do
       }
     end
 
-    it { is_expected.to contain_apt__setting('list-my_source').with_content(%r{# my_source\ndeb \[allow-insecure=yes\] http://debian.mirror.iweb.ca/debian/ jessie main\n}) }
+    it { is_expected.to contain_apt__setting('list-my_source').with_content(%r{# my_source\ndeb \[allow-insecure=yes\] http://debian.mirror.iweb.ca/debian/ stretch main\n}) }
   end
 
   context 'when allow_unsigned true' do
@@ -92,7 +92,7 @@ describe 'apt::source', type: :define do
       }
     end
 
-    it { is_expected.to contain_apt__setting('list-my_source').with_content(%r{# my_source\ndeb \[trusted=yes\] http://debian.mirror.iweb.ca/debian/ jessie main\n}) }
+    it { is_expected.to contain_apt__setting('list-my_source').with_content(%r{# my_source\ndeb \[trusted=yes\] http://debian.mirror.iweb.ca/debian/ stretch main\n}) }
   end
 
   context 'with architecture equals x86_64' do
@@ -104,7 +104,7 @@ describe 'apt::source', type: :define do
     end
 
     it {
-      is_expected.to contain_apt__setting('list-my_source').with_content(%r{# my_source\ndeb \[arch=x86_64\] http://debian.mirror.iweb.ca/debian/ jessie main\n})
+      is_expected.to contain_apt__setting('list-my_source').with_content(%r{# my_source\ndeb \[arch=x86_64\] http://debian.mirror.iweb.ca/debian/ stretch main\n})
     }
   end
 
index 9a8d4a764e2ebe970646bbfaa0e5a479ec101f3e..d702f62b74f94f076d97167f851968ce70b314a7 100644 (file)
@@ -19,11 +19,11 @@ describe 'apt::source' do
         family: 'Debian',
         name: 'Debian',
         release: {
-          major: '8',
-          full: '8.0',
+          major: '9',
+          full: '9.0',
         },
         distro: {
-          codename: 'jessie',
+          codename: 'stretch',
           id: 'Debian',
         },
       },
@@ -58,7 +58,7 @@ describe 'apt::source' do
       end
 
       it {
-        is_expected.to contain_apt__setting('list-my_source').with(ensure: 'present').with_content(%r{hello.there jessie main\n})
+        is_expected.to contain_apt__setting('list-my_source').with(ensure: 'present').with_content(%r{hello.there stretch main\n})
       }
 
       it { is_expected.to contain_file('/etc/apt/sources.list.d/my_source.list').that_notifies('Class[Apt::Update]') }
@@ -154,7 +154,7 @@ describe 'apt::source' do
     end
 
     it {
-      is_expected.to contain_apt__setting('list-my_source').with(ensure: 'present').with_content(%r{# my_source\ndeb \[allow-insecure=yes\] hello.there jessie main\n})
+      is_expected.to contain_apt__setting('list-my_source').with(ensure: 'present').with_content(%r{# my_source\ndeb \[allow-insecure=yes\] hello.there stretch main\n})
     }
   end
 
@@ -167,7 +167,7 @@ describe 'apt::source' do
     end
 
     it {
-      is_expected.to contain_apt__setting('list-my_source').with(ensure: 'present').with_content(%r{# my_source\ndeb \[trusted=yes\] hello.there jessie main\n})
+      is_expected.to contain_apt__setting('list-my_source').with(ensure: 'present').with_content(%r{# my_source\ndeb \[trusted=yes\] hello.there stretch main\n})
     }
   end
 
@@ -182,7 +182,7 @@ describe 'apt::source' do
     it {
       is_expected.to contain_apt__setting('list-my_source')
         .with(ensure: 'present')
-        .with_content(%r{# my_source\ndeb \[signed-by=/usr/share/keyrings/foo-archive-keyring.gpg\] hello.there jessie main\n})
+        .with_content(%r{# my_source\ndeb \[signed-by=/usr/share/keyrings/foo-archive-keyring.gpg\] hello.there stretch main\n})
     }
   end
 
@@ -199,7 +199,7 @@ describe 'apt::source' do
     it {
       is_expected.to contain_apt__setting('list-my_source')
         .with(ensure: 'present')
-        .with_content(%r{# my_source\ndeb \[arch=amd64 trusted=yes signed-by=/usr/share/keyrings/foo-archive-keyring.gpg\] hello.there jessie main\n})
+        .with_content(%r{# my_source\ndeb \[arch=amd64 trusted=yes signed-by=/usr/share/keyrings/foo-archive-keyring.gpg\] hello.there stretch main\n})
     }
   end
 
@@ -223,11 +223,11 @@ describe 'apt::source' do
           family: 'Debian',
           name: 'Debian',
           release: {
-            major: '8',
-            full: '8.0',
+            major: '9',
+            full: '9.0',
           },
           distro: {
-            codename: 'jessie',
+            codename: 'stretch',
             id: 'Debian',
           },
         },
@@ -318,7 +318,7 @@ describe 'apt::source' do
     end
 
     it {
-      is_expected.to contain_apt__setting('list-my_source').with(ensure: 'present').with_content(%r{# my_source\ndeb-src hello.there jessie main\n})
+      is_expected.to contain_apt__setting('list-my_source').with(ensure: 'present').with_content(%r{# my_source\ndeb-src hello.there stretch main\n})
     }
   end
 
@@ -331,7 +331,7 @@ describe 'apt::source' do
     end
 
     it {
-      is_expected.to contain_apt__setting('list-my_source').with(ensure: 'present').with_content(%r{# my_source\ndeb hello.there jessie main\ndeb-src hello.there jessie main\n})
+      is_expected.to contain_apt__setting('list-my_source').with(ensure: 'present').with_content(%r{# my_source\ndeb hello.there stretch main\ndeb-src hello.there stretch main\n})
     }
   end
 
@@ -358,9 +358,9 @@ describe 'apt::source' do
     end
 
     it {
-      is_expected.to contain_apt__setting('list-my_source').with(ensure: 'present').with_content(%r{deb-src hello.there jessie main\n})
+      is_expected.to contain_apt__setting('list-my_source').with(ensure: 'present').with_content(%r{deb-src hello.there stretch main\n})
     }
-    it { is_expected.to contain_apt__setting('list-my_source').without_content(%r{deb hello.there jessie main\n}) }
+    it { is_expected.to contain_apt__setting('list-my_source').without_content(%r{deb hello.there stretch main\n}) }
   end
 
   context 'with ensure => absent' do
index 17b6d817d8a7709a5cc6fe9f1abae14dc5c5ad88..f6302416681ca943281ca65bc13992f79226354b 100644 (file)
@@ -32,8 +32,8 @@ describe 'apt_has_dist_updates fact' do
       allow(Facter::Util::Resolution).to receive(:exec).with('/usr/bin/apt-get -s -o Debug::NoLocking=true upgrade 2>&1').and_return('test')
       apt_output = "Inst extremetuxracer [2015f-0+deb8u1] (2015g-0+deb8u1 Debian:stable-updates [all])\n" \
                    "Conf extremetuxracer (2015g-0+deb8u1 Debian:stable-updates [all])\n" \
-                   "Inst planet.rb [13-1.1] (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n" \
-                   "Conf planet.rb (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n"
+                   "Inst planet.rb [13-1.1] (22-2~bpo8+1 Debian Backports:stretch-backports [all])\n" \
+                   "Conf planet.rb (22-2~bpo8+1 Debian Backports:stretch-backports [all])\n"
       allow(Facter::Util::Resolution).to receive(:exec).with('/usr/bin/apt-get -s -o Debug::NoLocking=true dist-upgrade 2>&1').and_return(apt_output)
     end
     it { is_expected.to be true }
index 418c953ca3ee95d5112fd4d88f7588fd3377c1b7..2a5bfccb22474239900d285345a482541b22cb92 100644 (file)
@@ -29,8 +29,8 @@ describe 'apt_package_security_dist_updates fact' do
       let(:apt_get_upgrade_output) do
         "Inst extremetuxracer [2015f-0+deb8u1] (2015g-0+deb8u1 Debian:stable-updates [all])\n" \
           "Conf extremetuxracer (2015g-0+deb8u1 Debian:stable-updates [all])\n" \
-          "Inst planet.rb [13-1.1] (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n" \
-          "Conf planet.rb (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n" \
+          "Inst planet.rb [13-1.1] (22-2~bpo8+1 Debian Backports:-backports [all])\n" \
+          "Conf planet.rb (22-2~bpo8+1 Debian Backports:-backports [all])\n" \
           "Inst vim [7.52.1-5] (7.52.1-5+deb9u2 Debian-Security:9/stable [amd64]) []\n" \
           "Conf vim (7.52.1-5+deb9u2 Debian-Security:9/stable [amd64])\n" \
       end
@@ -40,12 +40,12 @@ describe 'apt_package_security_dist_updates fact' do
 
     describe 'on Ubuntu' do
       let(:apt_get_upgrade_output) do
-        "Inst extremetuxracer [2016f-0ubuntu0.16.04] (2016j-0ubuntu0.16.04 Ubuntu:16.04/xenial-security, Ubuntu:16.04/xenial-updates [all])\n" \
-          "Conf extremetuxracer (2016j-0ubuntu0.16.04 Ubuntu:16.04/xenial-security, Ubuntu:16.04/xenial-updates [all])\n" \
-          "Inst vim [7.47.0-1ubuntu2] (7.47.0-1ubuntu2.2 Ubuntu:16.04/xenial-security [amd64]) []\n" \
-          "Conf vim (7.47.0-1ubuntu2.2 Ubuntu:16.04/xenial-security [amd64])\n" \
-          "Inst onioncircuits [2:3.3.10-4ubuntu2] (2:3.3.10-4ubuntu2.3 Ubuntu:16.04/xenial-updates [amd64])\n" \
-          "Conf onioncircuits (2:3.3.10-4ubuntu2.3 Ubuntu:16.04/xenial-updates [amd64])\n"
+        "Inst extremetuxracer [2016f-0ubuntu0.18.04] (2016j-0ubuntu0.18.04 Ubuntu:18.04/xenial-security, Ubuntu:18.04/xenial-updates [all])\n" \
+          "Conf extremetuxracer (2016j-0ubuntu0.18.04 Ubuntu:18.04/xenial-security, Ubuntu:18.04/xenial-updates [all])\n" \
+          "Inst vim [7.47.0-1ubuntu2] (7.47.0-1ubuntu2.2 Ubuntu:18.04/xenial-security [amd64]) []\n" \
+          "Conf vim (7.47.0-1ubuntu2.2 Ubuntu:18.04/xenial-security [amd64])\n" \
+          "Inst onioncircuits [2:3.3.10-4ubuntu2] (2:3.3.10-4ubuntu2.3 Ubuntu:18.04/xenial-updates [amd64])\n" \
+          "Conf onioncircuits (2:3.3.10-4ubuntu2.3 Ubuntu:18.04/xenial-updates [amd64])\n"
       end
 
       it { is_expected.to eq(['extremetuxracer', 'vim']) }
index 952bf5c40d36a6cc71b17a9063f2bceed3c33790..013c16dda72fa3d574160230bc9b371f2fbbdb2a 100644 (file)
@@ -24,8 +24,8 @@ describe 'apt_package_dist_updates fact' do
       allow(File).to receive(:executable?).with('/usr/bin/apt-get').and_return(true)
       apt_output = "Inst extremetuxracer [2015f-0+deb8u1] (2015g-0+deb8u1 Debian:stable-updates [all])\n" \
                    "Conf extremetuxracer (2015g-0+deb8u1 Debian:stable-updates [all])\n" \
-                   "Inst planet.rb [13-1.1] (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n" \
-                   "Conf planet.rb (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n"
+                   "Inst planet.rb [13-1.1] (22-2~bpo8+1 Debian Backports:-backports [all])\n" \
+                   "Conf planet.rb (22-2~bpo8+1 Debian Backports:-backports [all])\n"
       allow(Facter::Util::Resolution).to receive(:exec).with('/usr/bin/apt-get -s -o Debug::NoLocking=true dist-upgrade 2>&1').and_return(apt_output)
     end
     it { is_expected.to eq(['extremetuxracer', 'planet.rb']) }
index c75df88a2d278b09d0e462d984e35b2adfe958a2..abeeccbcd878f7251ff8f65445239dbe50a20510 100644 (file)
@@ -29,8 +29,8 @@ describe 'apt_security_updates fact' do
       let(:apt_get_upgrade_output) do
         "Inst extremetuxracer [2015f-0+deb8u1] (2015g-0+deb8u1 Debian:stable-updates [all])\n" \
           "Conf extremetuxracer (2015g-0+deb8u1 Debian:stable-updates [all])\n" \
-          "Inst planet.rb [13-1.1] (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n" \
-          "Conf planet.rb (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n" \
+          "Inst planet.rb [13-1.1] (22-2~bpo8+1 Debian Backports:-backports [all])\n" \
+          "Conf planet.rb (22-2~bpo8+1 Debian Backports:-backports [all])\n" \
           "Inst vim [7.52.1-5] (7.52.1-5+deb9u2 Debian-Security:9/stable [amd64]) []\n" \
           "Conf vim (7.52.1-5+deb9u2 Debian-Security:9/stable [amd64])\n" \
       end
@@ -40,12 +40,12 @@ describe 'apt_security_updates fact' do
 
     describe 'on Ubuntu' do
       let(:apt_get_upgrade_output) do
-        "Inst extremetuxracer [2016f-0ubuntu0.16.04] (2016j-0ubuntu0.16.04 Ubuntu:16.04/xenial-security, Ubuntu:16.04/xenial-updates [all])\n" \
-          "Conf extremetuxracer (2016j-0ubuntu0.16.04 Ubuntu:16.04/xenial-security, Ubuntu:16.04/xenial-updates [all])\n" \
-          "Inst vim [7.47.0-1ubuntu2] (7.47.0-1ubuntu2.2 Ubuntu:16.04/xenial-security [amd64]) []\n" \
-          "Conf vim (7.47.0-1ubuntu2.2 Ubuntu:16.04/xenial-security [amd64])\n" \
-          "Inst onioncircuits [2:3.3.10-4ubuntu2] (2:3.3.10-4ubuntu2.3 Ubuntu:16.04/xenial-updates [amd64])\n" \
-          "Conf onioncircuits (2:3.3.10-4ubuntu2.3 Ubuntu:16.04/xenial-updates [amd64])\n"
+        "Inst extremetuxracer [2016f-0ubuntu0.18.04] (2016j-0ubuntu0.18.04 Ubuntu:18.04/xenial-security, Ubuntu:18.04/xenial-updates [all])\n" \
+          "Conf extremetuxracer (2016j-0ubuntu0.18.04 Ubuntu:18.04/xenial-security, Ubuntu:18.04/xenial-updates [all])\n" \
+          "Inst vim [7.47.0-1ubuntu2] (7.47.0-1ubuntu2.2 Ubuntu:18.04/xenial-security [amd64]) []\n" \
+          "Conf vim (7.47.0-1ubuntu2.2 Ubuntu:18.04/xenial-security [amd64])\n" \
+          "Inst onioncircuits [2:3.3.10-4ubuntu2] (2:3.3.10-4ubuntu2.3 Ubuntu:18.04/xenial-updates [amd64])\n" \
+          "Conf onioncircuits (2:3.3.10-4ubuntu2.3 Ubuntu:18.04/xenial-updates [amd64])\n"
       end
 
       it { is_expected.to eq(2) }
index 2bce358728b79e63536f5ec24497cf37ec83c09d..d8a2696054bb1ac88e1e55a8059c9e4ed76524a3 100644 (file)
@@ -24,8 +24,8 @@ describe 'apt_updates fact' do
       allow(File).to receive(:executable?).with('/usr/bin/apt-get').and_return(true)
       apt_output = "Inst extremetuxracer [2015f-0+deb8u1] (2015g-0+deb8u1 Debian:stable-updates [all])\n" \
                    "Conf extremetuxracer (2015g-0+deb8u1 Debian:stable-updates [all])\n" \
-                   "Inst planet.rb [13-1.1] (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n" \
-                   "Conf planet.rb (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n"
+                   "Inst planet.rb [13-1.1] (22-2~bpo8+1 Debian Backports:-backports [all])\n" \
+                   "Conf planet.rb (22-2~bpo8+1 Debian Backports:-backports [all])\n"
       allow(Facter::Util::Resolution).to receive(:exec).with('/usr/bin/apt-get -s -o Debug::NoLocking=true dist-upgrade 2>&1').and_return(apt_output)
     end
     it { is_expected.to eq(2) }
index 1fc5ab6b120540ff92b3c32a6125f4f3d12579c3..d0813c8b4ec9495976d16b836c1e70902af5a269 100644 (file)
@@ -31,8 +31,8 @@ describe 'apt_has_updates fact' do
       allow(File).to receive(:executable?).with('/usr/bin/apt-get').and_return(true)
       apt_output = "Inst tzdata [2015f-0+deb8u1] (2015g-0+deb8u1 Debian:stable-updates [all])\n" \
                    "Conf tzdata (2015g-0+deb8u1 Debian:stable-updates [all])\n" \
-                   "Inst unhide.rb [13-1.1] (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n" \
-                   "Conf unhide.rb (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n"
+                   "Inst unhide.rb [13-1.1] (22-2~bpo8+1 Debian Backports:-backports [all])\n" \
+                   "Conf unhide.rb (22-2~bpo8+1 Debian Backports:-backports [all])\n"
       allow(Facter::Util::Resolution).to receive(:exec).with('/usr/bin/apt-get -s -o Debug::NoLocking=true upgrade 2>&1').and_return(apt_output)
     end
     it { is_expected.to be true }
index 699eb61346b08552db6b936fb9bb3c64241e81f8..d9d4643ca7baacc90e0b1acd1700859ce141998b 100644 (file)
@@ -27,8 +27,8 @@ describe 'apt_package_security_updates fact' do
       let(:apt_get_upgrade_output) do
         "Inst tzdata [2015f-0+deb8u1] (2015g-0+deb8u1 Debian:stable-updates [all])\n" \
           "Conf tzdata (2015g-0+deb8u1 Debian:stable-updates [all])\n" \
-          "Inst unhide.rb [13-1.1] (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n" \
-          "Conf unhide.rb (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n" \
+          "Inst unhide.rb [13-1.1] (22-2~bpo8+1 Debian Backports:-backports [all])\n" \
+          "Conf unhide.rb (22-2~bpo8+1 Debian Backports:-backports [all])\n" \
           "Inst curl [7.52.1-5] (7.52.1-5+deb9u2 Debian-Security:9/stable [amd64]) []\n" \
           "Conf curl (7.52.1-5+deb9u2 Debian-Security:9/stable [amd64])\n" \
       end
@@ -38,12 +38,12 @@ describe 'apt_package_security_updates fact' do
 
     describe 'on Ubuntu' do
       let(:apt_get_upgrade_output) do
-        "Inst tzdata [2016f-0ubuntu0.16.04] (2016j-0ubuntu0.16.04 Ubuntu:16.04/xenial-security, Ubuntu:16.04/xenial-updates [all])\n" \
-          "Conf tzdata (2016j-0ubuntu0.16.04 Ubuntu:16.04/xenial-security, Ubuntu:16.04/xenial-updates [all])\n" \
-          "Inst curl [7.47.0-1ubuntu2] (7.47.0-1ubuntu2.2 Ubuntu:16.04/xenial-security [amd64]) []\n" \
-          "Conf curl (7.47.0-1ubuntu2.2 Ubuntu:16.04/xenial-security [amd64])\n" \
-          "Inst procps [2:3.3.10-4ubuntu2] (2:3.3.10-4ubuntu2.3 Ubuntu:16.04/xenial-updates [amd64])\n" \
-          "Conf procps (2:3.3.10-4ubuntu2.3 Ubuntu:16.04/xenial-updates [amd64])\n"
+        "Inst tzdata [2016f-0ubuntu0.18.04] (2016j-0ubuntu0.18.04 Ubuntu:18.04/xenial-security, Ubuntu:18.04/xenial-updates [all])\n" \
+          "Conf tzdata (2016j-0ubuntu0.18.04 Ubuntu:18.04/xenial-security, Ubuntu:18.04/xenial-updates [all])\n" \
+          "Inst curl [7.47.0-1ubuntu2] (7.47.0-1ubuntu2.2 Ubuntu:18.04/xenial-security [amd64]) []\n" \
+          "Conf curl (7.47.0-1ubuntu2.2 Ubuntu:18.04/xenial-security [amd64])\n" \
+          "Inst procps [2:3.3.10-4ubuntu2] (2:3.3.10-4ubuntu2.3 Ubuntu:18.04/xenial-updates [amd64])\n" \
+          "Conf procps (2:3.3.10-4ubuntu2.3 Ubuntu:18.04/xenial-updates [amd64])\n"
       end
 
       it { is_expected.to eq(['tzdata', 'curl']) }
index 267e2bfae68e344024ac6c5ff4c363853aa797a1..d32339fea85204e2ff3981c46e1891469939d5b4 100644 (file)
@@ -22,8 +22,8 @@ describe 'apt_package_updates fact' do
       allow(File).to receive(:executable?).with('/usr/bin/apt-get').and_return(true)
       apt_output = "Inst tzdata [2015f-0+deb8u1] (2015g-0+deb8u1 Debian:stable-updates [all])\n" \
                    "Conf tzdata (2015g-0+deb8u1 Debian:stable-updates [all])\n" \
-                   "Inst unhide.rb [13-1.1] (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n" \
-                   "Conf unhide.rb (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n"
+                   "Inst unhide.rb [13-1.1] (22-2~bpo8+1 Debian Backports:-backports [all])\n" \
+                   "Conf unhide.rb (22-2~bpo8+1 Debian Backports:-backports [all])\n"
       allow(Facter::Util::Resolution).to receive(:exec).with('/usr/bin/apt-get -s -o Debug::NoLocking=true upgrade 2>&1').and_return(apt_output)
     end
     it { is_expected.to eq(['tzdata', 'unhide.rb']) }
index 89421205bc2f0be881bbe22094033bd7e3deef4f..4baeb810e53a732d7d6469545cbba424c9d484dc 100644 (file)
@@ -27,8 +27,8 @@ describe 'apt_security_updates fact' do
       let(:apt_get_upgrade_output) do
         "Inst tzdata [2015f-0+deb8u1] (2015g-0+deb8u1 Debian:stable-updates [all])\n" \
           "Conf tzdata (2015g-0+deb8u1 Debian:stable-updates [all])\n" \
-          "Inst unhide.rb [13-1.1] (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n" \
-          "Conf unhide.rb (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n" \
+          "Inst unhide.rb [13-1.1] (22-2~bpo8+1 Debian Backports:-backports [all])\n" \
+          "Conf unhide.rb (22-2~bpo8+1 Debian Backports:-backports [all])\n" \
           "Inst curl [7.52.1-5] (7.52.1-5+deb9u2 Debian-Security:9/stable [amd64]) []\n" \
           "Conf curl (7.52.1-5+deb9u2 Debian-Security:9/stable [amd64])\n" \
       end
@@ -38,12 +38,12 @@ describe 'apt_security_updates fact' do
 
     describe 'on Ubuntu' do
       let(:apt_get_upgrade_output) do
-        "Inst tzdata [2016f-0ubuntu0.16.04] (2016j-0ubuntu0.16.04 Ubuntu:16.04/xenial-security, Ubuntu:16.04/xenial-updates [all])\n" \
-          "Conf tzdata (2016j-0ubuntu0.16.04 Ubuntu:16.04/xenial-security, Ubuntu:16.04/xenial-updates [all])\n" \
-          "Inst curl [7.47.0-1ubuntu2] (7.47.0-1ubuntu2.2 Ubuntu:16.04/xenial-security [amd64]) []\n" \
-          "Conf curl (7.47.0-1ubuntu2.2 Ubuntu:16.04/xenial-security [amd64])\n" \
-          "Inst procps [2:3.3.10-4ubuntu2] (2:3.3.10-4ubuntu2.3 Ubuntu:16.04/xenial-updates [amd64])\n" \
-          "Conf procps (2:3.3.10-4ubuntu2.3 Ubuntu:16.04/xenial-updates [amd64])\n"
+        "Inst tzdata [2016f-0ubuntu0.18.04] (2016j-0ubuntu0.18.04 Ubuntu:18.04/xenial-security, Ubuntu:18.04/xenial-updates [all])\n" \
+          "Conf tzdata (2016j-0ubuntu0.18.04 Ubuntu:18.04/xenial-security, Ubuntu:18.04/xenial-updates [all])\n" \
+          "Inst curl [7.47.0-1ubuntu2] (7.47.0-1ubuntu2.2 Ubuntu:18.04/xenial-security [amd64]) []\n" \
+          "Conf curl (7.47.0-1ubuntu2.2 Ubuntu:18.04/xenial-security [amd64])\n" \
+          "Inst procps [2:3.3.10-4ubuntu2] (2:3.3.10-4ubuntu2.3 Ubuntu:18.04/xenial-updates [amd64])\n" \
+          "Conf procps (2:3.3.10-4ubuntu2.3 Ubuntu:18.04/xenial-updates [amd64])\n"
       end
 
       it { is_expected.to eq(2) }
index 5114104b06e7573b58d5febf9eaa6e2ad7fb6fbf..280c6af8e90cf2d9ed46e480ead1dc4e8936e9bb 100644 (file)
@@ -22,8 +22,8 @@ describe 'apt_updates fact' do
       allow(File).to receive(:executable?).with('/usr/bin/apt-get').and_return(true)
       apt_output = "Inst tzdata [2015f-0+deb8u1] (2015g-0+deb8u1 Debian:stable-updates [all])\n" \
                    "Conf tzdata (2015g-0+deb8u1 Debian:stable-updates [all])\n" \
-                   "Inst unhide.rb [13-1.1] (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n" \
-                   "Conf unhide.rb (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n"
+                   "Inst unhide.rb [13-1.1] (22-2~bpo8+1 Debian Backports:-backports [all])\n" \
+                   "Conf unhide.rb (22-2~bpo8+1 Debian Backports:-backports [all])\n"
       allow(Facter::Util::Resolution).to receive(:exec).with('/usr/bin/apt-get -s -o Debug::NoLocking=true upgrade 2>&1').and_return(apt_output)
     end
     it { is_expected.to eq(2) }