Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue MODULES-5545 #390

Merged
merged 1 commit into from
Sep 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions manifests/repo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
'x86_64' => "http://repo.mongodb.org/yum/redhat/${::operatingsystemmajrelease}/mongodb-org/${mongover[0]}.${mongover[1]}/x86_64/",
default => undef
}
$description = 'MongoDB Repository'
}
else {
$location = $::architecture ? {
Expand Down
15 changes: 15 additions & 0 deletions spec/classes/repo_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,19 @@
})
end
end

context "when deploying on CentOS with version >= 3.0" do
with_centos_facts

let :params do
{
:version => '3.4.7-1.el7',
}
end

it {
is_expected.to contain_class('mongodb::repo::yum')
}
end

end
22 changes: 12 additions & 10 deletions spec/spec_helper_local.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,25 @@ def with_debian_facts
def with_centos_facts
let :facts do
{
:architecture => 'x86_64',
:operatingsystem => 'CentOS',
:operatingsystemrelease => '7.0',
:osfamily => 'RedHat',
:root_home => '/root',
:architecture => 'x86_64',
:operatingsystem => 'CentOS',
:operatingsystemrelease => '7.0',
:operatingsystemmajrelease => '7',
:osfamily => 'RedHat',
:root_home => '/root',
}
end
end

def with_redhat_facts
let :facts do
{
:architecture => 'x86_64',
:operatingsystem => 'RedHat',
:operatingsystemrelease => '7.0',
:osfamily => 'RedHat',
:root_home => '/root',
:architecture => 'x86_64',
:operatingsystem => 'RedHat',
:operatingsystemrelease => '7.0',
:operatingsystemmajrelease => '7',
:osfamily => 'RedHat',
:root_home => '/root',
}
end
end