}
$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 = {
}
$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\"]')
$_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']
$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 {
'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,
default:
provisioner: docker
images:
- - litmusimage/debian:8
+ - litmusimage/debian:9
vagrant:
provisioner: vagrant
images:
travis_ub_6:
provisioner: docker
images:
- - litmusimage/ubuntu:16.04
- litmusimage/ubuntu:18.04
- litmusimage/ubuntu:20.04
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:
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
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)
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
family: 'Debian',
name: 'Debian',
release: {
- major: '8',
- full: '8.0',
+ major: '9',
+ full: '9.0',
},
distro: {
- codename: 'jessie',
+ codename: 'stretch',
id: 'Debian',
},
},
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
family: 'Debian',
name: 'Ubuntu',
release: {
- major: '16',
- full: '16.04',
+ major: '18',
+ full: '18.04',
},
distro: {
- codename: 'xenial',
+ codename: 'bionac',
id: 'Ubuntu',
},
},
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
family: 'Debian',
name: 'Ubuntu',
release: {
- major: '16',
- full: '16.04',
+ major: '18',
+ full: '18.04',
},
distro: {
- codename: 'xenial',
+ codename: 'bionac',
id: 'Ubuntu',
},
},
family: 'Debian',
name: 'Ubuntu',
release: {
- major: '16',
- full: '16.04',
+ major: '18',
+ full: '18.04',
},
distro: {
- codename: 'xenial',
+ codename: 'bionac',
id: 'Ubuntu',
},
},
family: 'Debian',
name: 'Ubuntu',
release: {
- major: '16',
- full: '16.04',
+ major: '18',
+ full: '18.04',
},
distro: {
- codename: 'xenial',
+ codename: 'bionac',
id: 'Ubuntu',
},
},
family: 'Debian',
name: 'Debian',
release: {
- major: '8',
- full: '8.0',
+ major: '9',
+ full: '9.0',
},
distro: {
- codename: 'jessie',
+ codename: 'stretch',
id: 'Debian',
},
},
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',
},
},
},
- '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',
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
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]',
family: 'Debian',
name: 'Ubuntu',
release: {
- major: '16',
- full: '16.04',
+ major: '18',
+ full: '18.04',
},
distro: {
- codename: 'xenial',
+ codename: 'bionic',
id: 'Ubuntu',
},
},
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
family: 'Debian',
name: 'Ubuntu',
release: {
- major: '16',
- full: '16.04',
+ major: '18',
+ full: '18.04',
},
distro: {
- codename: 'xenial',
+ codename: 'bionic',
id: 'Ubuntu',
},
},
family: 'Debian',
name: 'Ubuntu',
release: {
- major: '16',
- full: '16.04',
+ major: '18',
+ full: '18.04',
},
distro: {
- codename: 'xenial',
+ codename: 'bionic',
id: 'Ubuntu',
},
},
family: 'Debian',
name: 'Ubuntu',
release: {
- major: '16',
- full: '16.04',
+ major: '18',
+ full: '18.04',
},
distro: {
- codename: 'xenial',
+ codename: 'bionic',
id: 'Ubuntu',
},
},
family: 'Debian',
name: 'Ubuntu',
release: {
- major: '16',
- full: '16.04',
+ major: '18',
+ full: '18.04',
},
distro: {
- codename: 'xenial',
+ codename: 'bionic',
id: 'Ubuntu',
},
},
family: 'Debian',
name: 'Ubuntu',
release: {
- major: '16',
- full: '16.04',
+ major: '18',
+ full: '18.04',
},
distro: {
- codename: 'xenial',
+ codename: 'bionic',
id: 'Ubuntu',
},
},
family: 'Debian',
name: 'Debian',
release: {
- major: '8',
- full: '8.0',
+ major: '9',
+ full: '9.0',
},
distro: {
- codename: 'jessie',
+ codename: 'stretch',
id: 'Debian',
},
},
family: 'Debian',
name: 'Debian',
release: {
- major: '8',
- full: '8.0',
+ major: '9',
+ full: '9.0',
},
distro: {
- codename: 'jessie',
+ codename: 'stretch',
id: 'Debian',
},
},
family: 'Debian',
name: 'Debian',
release: {
- major: '8',
- full: '8.0',
+ major: '9',
+ full: '9.0',
},
distro: {
- codename: 'jessie',
+ codename: 'stretch',
id: 'Debian',
},
},
family: 'Debian',
name: 'Debian',
release: {
- major: '8',
- full: '8.0',
+ major: '9',
+ full: '9.0',
},
distro: {
- codename: 'jessie',
+ codename: 'stretch',
id: 'Debian',
},
},
family: 'Debian',
name: 'Debian',
release: {
- major: '8',
- full: '8.0',
+ major: '9',
+ full: '9.0',
},
distro: {
- codename: 'jessie',
+ codename: 'stretch',
id: 'Debian',
},
},
family: 'Debian',
name: 'Debian',
release: {
- major: '8',
- full: '8.0',
+ major: '9',
+ full: '9.0',
},
distro: {
- codename: 'jessie',
+ codename: 'stretch',
id: 'Debian',
},
},
family: 'Debian',
name: 'Debian',
release: {
- major: '8',
- full: '8.0',
+ major: '9',
+ full: '9.0',
},
distro: {
- codename: 'jessie',
+ codename: 'stretch',
id: 'Debian',
},
},
family: 'Debian',
name: 'Debian',
release: {
- major: '8',
- full: '8.0',
+ major: '9',
+ full: '9.0',
},
distro: {
- codename: 'jessie',
+ codename: 'stretch',
id: 'Debian',
},
},
family: 'Debian',
name: 'Debian',
release: {
- major: '8',
- full: '8.0',
+ major: '9',
+ full: '9.0',
},
distro: {
- codename: 'jessie',
+ codename: 'stretch',
id: 'Debian',
},
},
family: 'Debian',
name: 'Debian',
release: {
- major: '8',
- full: '8.0',
+ major: '9',
+ full: '9.0',
},
distro: {
- codename: 'jessie',
+ codename: 'stretch',
id: 'Debian',
},
},
family: 'Debian',
name: 'Debian',
release: {
- major: '8',
- full: '8.0',
+ major: '9',
+ full: '9.0',
},
distro: {
- codename: 'jessie',
+ codename: 'stretch',
id: 'Debian',
},
},
family: 'Debian',
name: 'Debian',
release: {
- major: '8',
- full: '8.0',
+ major: '9',
+ full: '9.0',
},
distro: {
- codename: 'jessie',
+ codename: 'stretch',
id: 'Debian',
},
},
family: 'Debian',
name: 'Debian',
release: {
- major: '8',
- full: '8.0',
+ major: '9',
+ full: '9.0',
},
distro: {
- codename: 'jessie',
+ codename: 'stretch',
id: 'Debian',
},
},
family: 'Debian',
name: 'Ubuntu',
release: {
- major: '14',
- full: '14.04',
+ major: '18',
+ full: '18.04',
},
distro: {
codename: 'trusty',
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')
}
family: 'Debian',
name: 'Ubuntu',
release: {
- major: '14',
- full: '14.04',
+ major: '18',
+ full: '18.04',
},
distro: {
codename: 'trusty',
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
family: 'Debian',
name: 'Ubuntu',
release: {
- major: '14',
- full: '14.04',
+ major: '18',
+ full: '18.04',
},
distro: {
codename: 'trusty',
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
family: 'Debian',
name: 'Ubuntu',
release: {
- major: '14',
- full: '14.04',
+ major: '18',
+ full: '18.04',
},
distro: {
codename: 'trusty',
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')
}
family: 'Debian',
name: 'Ubuntu',
release: {
- major: '14',
- full: '14.04',
+ major: '18',
+ full: '18.04',
},
distro: {
codename: 'trusty',
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')
}
family: 'Debian',
name: 'Ubuntu',
release: {
- major: '14',
- full: '14.04',
+ major: '18',
+ full: '18.04',
},
distro: {
codename: 'trusty',
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')
}
family: 'Debian',
name: 'Ubuntu',
release: {
- major: '14',
- full: '14.04',
+ major: '18',
+ full: '18.04',
},
distro: {
codename: 'trusty',
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')
}
family: 'Debian',
name: 'Ubuntu',
release: {
- major: '14',
- full: '14.04',
+ major: '18',
+ full: '18.04',
},
distro: {
codename: 'trusty',
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
family: 'Debian',
name: 'Ubuntu',
release: {
- major: '14',
- full: '14.04',
+ major: '18',
+ full: '18.04',
},
distro: {
codename: nil,
family: 'Debian',
name: 'Debian',
release: {
- major: '8',
- full: '8.0',
+ major: '9',
+ full: '9.0',
},
distro: {
- codename: 'jessie',
+ codename: 'stretch',
id: 'Debian',
},
},
family: 'Debian',
name: 'Debian',
release: {
- major: '8',
- full: '8.0',
+ major: '9',
+ full: '9.0',
},
distro: {
- codename: 'jessie',
+ codename: 'stretch',
id: 'Debian',
},
},
family: 'Debian',
name: 'Debian',
release: {
- major: '8',
- full: '8.0',
+ major: '9',
+ full: '9.0',
},
distro: {
- codename: 'jessie',
+ codename: 'stretch',
id: 'Debian',
},
},
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
}
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
}
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
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
family: 'Debian',
name: 'Debian',
release: {
- major: '8',
- full: '8.0',
+ major: '9',
+ full: '9.0',
},
distro: {
- codename: 'jessie',
+ codename: 'stretch',
id: 'Debian',
},
},
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]') }
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
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
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
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
family: 'Debian',
name: 'Debian',
release: {
- major: '8',
- full: '8.0',
+ major: '9',
+ full: '9.0',
},
distro: {
- codename: 'jessie',
+ codename: 'stretch',
id: 'Debian',
},
},
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
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
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
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 }
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
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']) }
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']) }
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
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) }
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) }
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 }
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
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']) }
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']) }
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
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) }
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) }