Skip to content

Commit

Permalink
backports unit tests: delete linuxmint tests
Browse files Browse the repository at this point in the history
Linux Mint is not listed as supported in the metadata.json file, so we
shouldn't carry tests for it (which are using facts for an end-of-life
release).
  • Loading branch information
kenyon committed Jun 10, 2024
1 parent 1825140 commit 8f9d0af
Showing 1 changed file with 0 additions and 82 deletions.
82 changes: 0 additions & 82 deletions spec/classes/apt_backports_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,88 +146,6 @@
end
end

describe 'linuxmint tests' do
let(:facts) do
{
os: {
family: 'Debian',
name: 'LinuxMint',
release: {
major: '17',
full: '17'
},
distro: {
codename: 'qiana',
id: 'LinuxMint'
}
}
}
end

context 'with all the needed things set' do
let(:params) do
{
location: 'http://archive.ubuntu.com/ubuntu',
release: 'trusty-backports',
repos: 'main universe multiverse restricted',
key: '630239CC130E1A7FD81A27B140976EAF437D05B5'
}
end

it {
expect(subject).to contain_apt__source('backports').with(
location: 'http://archive.ubuntu.com/ubuntu',
key: '630239CC130E1A7FD81A27B140976EAF437D05B5',
repos: 'main universe multiverse restricted',
release: 'trusty-backports',
pin: { 'priority' => 200, 'release' => 'trusty-backports' },
)
}
end

context 'with missing location' do
let(:params) do
{
release: 'trusty-backports',
repos: 'main universe multiverse restricted',
key: '630239CC130E1A7FD81A27B140976EAF437D05B5'
}
end

it do
expect(subject).to raise_error(Puppet::Error, %r{If not on Debian or Ubuntu, you must explicitly pass location, release, and repos})
end
end

context 'with missing release' do
let(:params) do
{
location: 'http://archive.ubuntu.com/ubuntu',
repos: 'main universe multiverse restricted',
key: '630239CC130E1A7FD81A27B140976EAF437D05B5'
}
end

it do
expect(subject).to raise_error(Puppet::Error, %r{If not on Debian or Ubuntu, you must explicitly pass location, release, and repos})
end
end

context 'with missing repos' do
let(:params) do
{
location: 'http://archive.ubuntu.com/ubuntu',
release: 'trusty-backports',
key: '630239CC130E1A7FD81A27B140976EAF437D05B5'
}
end

it do
expect(subject).to raise_error(Puppet::Error, %r{If not on Debian or Ubuntu, you must explicitly pass location, release, and repos})
end
end
end

describe 'validation' do
let(:facts) do
{
Expand Down

0 comments on commit 8f9d0af

Please sign in to comment.