-
-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #374 from dbeckham/fix_os_name_fact_issue
Fix OS facts usage when selecting repo class for Ubuntu systems
- Loading branch information
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
require 'spec_helper' | ||
|
||
describe 'php::repo', type: :class do | ||
on_supported_os.each do |os, facts| | ||
context "on #{os}" do | ||
let :facts do | ||
facts | ||
end | ||
|
||
describe 'when configuring a package repo' do | ||
case facts[:osfamily] | ||
when 'Debian' | ||
case facts[:operatingsystem] | ||
when 'Debian' | ||
it { is_expected.to contain_class('php::repo::debian') } | ||
when 'Ubuntu' | ||
it { is_expected.to contain_class('php::repo::ubuntu') } | ||
end | ||
when 'Suse' | ||
it { is_expected.to contain_class('php::repo::suse') } | ||
when 'RedHat' | ||
it { is_expected.to contain_class('php::repo::redhat') } | ||
end | ||
end | ||
end | ||
end | ||
end |