Skip to content

Commit

Permalink
proposed fix for #573
Browse files Browse the repository at this point in the history
  • Loading branch information
William Yardley committed Aug 30, 2017
1 parent 233b02b commit 8e17b30
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 14 deletions.
2 changes: 1 addition & 1 deletion manifests/repo/rhel.pp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Class: rabbitmq::repo::rhel
# Makes sure that the Packagecloud repo is installed
class rabbitmq::repo::rhel(
$location = 'https://packagecloud.io/rabbitmq/rabbitmq-server/el/$releasever/$basearch',
$location = "https://packagecloud.io/rabbitmq/rabbitmq-server/el/${::os[release][major]}/\$basearch",
$key_source = 'https://www.rabbitmq.com/rabbitmq-release-signing-key.asc',
) {

Expand Down
2 changes: 1 addition & 1 deletion spec/classes/rabbitmq_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
end
it 'the repo should be present, and contain the expected values' do
is_expected.to contain_yumrepo('rabbitmq').with(ensure: 'present',
baseurl: 'https://packagecloud.io/rabbitmq/rabbitmq-server/el/$releasever/$basearch',
baseurl: 'https://packagecloud.io/rabbitmq/rabbitmq-server/el/7/$basearch',
gpgkey: 'https://www.rabbitmq.com/rabbitmq-release-signing-key.asc')
end
end
Expand Down
36 changes: 24 additions & 12 deletions spec/spec_helper_local.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@

def with_debian_facts
let :facts do
super().merge(operatingsystemmajrelease: '6',
lsbdistcodename: 'squeeze',
lsbdistid: 'Debian',
osfamily: 'Debian',
os: {
name: 'Debian',
release: { full: '6.0' }
})
super().merge(
operatingsystemmajrelease: '6',
lsbdistcodename: 'squeeze',
lsbdistid: 'Debian',
osfamily: 'Debian',
os:
{
name: 'Debian',
release: { full: '6.0' }
}
)
end
end

Expand All @@ -28,15 +31,24 @@ def with_openbsd_facts
# operatingsystemrelease may contain X.X-current
# or other prefixes
let :facts do
super().merge(kernelversion: '5.9',
osfamily: 'OpenBSD')
super().merge(
kernelversion: '5.9',
osfamily: 'OpenBSD'
)
end
end

def with_redhat_facts
let :facts do
super().merge(operatingsystemmajrelease: '7',
osfamily: 'Redhat')
super().merge(
operatingsystemmajrelease: '7',
osfamily: 'Redhat',
os:
{
name: 'CentOS',
release: { major: '7' }
}
)
end
end

Expand Down

0 comments on commit 8e17b30

Please sign in to comment.