-
-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
spec/unit/facter/util/fact_icinga2_puppet_hostcert_spec.rb
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,38 @@ | ||
require 'spec_helper' | ||
|
||
describe Facter::Util::Fact do | ||
on_supported_os.each do |os, facts| | ||
let :facts do | ||
facts | ||
end | ||
|
||
context "#{os} icinga2_puppet_hostcert fact" do | ||
it { expect(Facter.fact(:icinga2_puppet_hostcert).value).to match(/\/ssl\/certs\/.*.pem/) } | ||
end | ||
end | ||
end | ||
|
||
describe('icinga2::feature::gelf', :type => :class) do | ||
let(:facts) { { | ||
:kernel => 'Windows', | ||
:architecture => 'x86_64', | ||
:osfamily => 'Windows', | ||
:operatingsystem => 'Windows', | ||
:operatingsystemmajrelease => '2012 R2', | ||
:path => 'C:\Program Files\Puppet Labs\Puppet\puppet\bin; | ||
C:\Program Files\Puppet Labs\Puppet\facter\bin; | ||
C:\Program Files\Puppet Labs\Puppet\hiera\bin; | ||
C:\Program Files\Puppet Labs\Puppet\mcollective\bin; | ||
C:\Program Files\Puppet Labs\Puppet\bin; | ||
C:\Program Files\Puppet Labs\Puppet\sys\ruby\bin; | ||
C:\Program Files\Puppet Labs\Puppet\sys\tools\bin; | ||
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem; | ||
C:\Windows\System32\WindowsPowerShell\v1.0\; | ||
C:\ProgramData\chocolatey\bin;', | ||
} } | ||
|
||
context "Windows 2012 R2 icinga2_puppet_hostcert fact" do | ||
it { expect(Facter.fact(:icinga2_puppet_hostcert).value).to match(/\/ssl\/certs\/.*.pem/) } | ||
end | ||
|
||
end |
38 changes: 38 additions & 0 deletions
38
spec/unit/facter/util/fact_icinga2_puppet_hostprivkey_spec.rb
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,38 @@ | ||
require 'spec_helper' | ||
|
||
describe Facter::Util::Fact do | ||
on_supported_os.each do |os, facts| | ||
let :facts do | ||
facts | ||
end | ||
|
||
context "#{os} icinga2_puppet_hostprivkey fact" do | ||
it { expect(Facter.fact(:icinga2_puppet_hostprivkey).value).to match(/\/ssl\/private_keys\/.*.pem/) } | ||
end | ||
end | ||
end | ||
|
||
describe('icinga2::feature::gelf', :type => :class) do | ||
let(:facts) { { | ||
:kernel => 'Windows', | ||
:architecture => 'x86_64', | ||
:osfamily => 'Windows', | ||
:operatingsystem => 'Windows', | ||
:operatingsystemmajrelease => '2012 R2', | ||
:path => 'C:\Program Files\Puppet Labs\Puppet\puppet\bin; | ||
C:\Program Files\Puppet Labs\Puppet\facter\bin; | ||
C:\Program Files\Puppet Labs\Puppet\hiera\bin; | ||
C:\Program Files\Puppet Labs\Puppet\mcollective\bin; | ||
C:\Program Files\Puppet Labs\Puppet\bin; | ||
C:\Program Files\Puppet Labs\Puppet\sys\ruby\bin; | ||
C:\Program Files\Puppet Labs\Puppet\sys\tools\bin; | ||
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem; | ||
C:\Windows\System32\WindowsPowerShell\v1.0\; | ||
C:\ProgramData\chocolatey\bin;', | ||
} } | ||
|
||
context "Windows 2012 R2 icinga2_puppet_hostprivkey fact" do | ||
it { expect(Facter.fact(:icinga2_puppet_hostprivkey).value).to match(/\/ssl\/private_keys\/.*.pem/) } | ||
end | ||
|
||
end |
38 changes: 38 additions & 0 deletions
38
spec/unit/facter/util/fact_icinga2_puppet_localcacert_spec.rb
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,38 @@ | ||
require 'spec_helper' | ||
|
||
describe Facter::Util::Fact do | ||
on_supported_os.each do |os, facts| | ||
let :facts do | ||
facts | ||
end | ||
|
||
context "#{os} icinga2_puppet_localcacert fact" do | ||
it { expect(Facter.fact(:icinga2_puppet_localcacert).value).to match(/\/ssl\/certs\/.*.pem/) } | ||
end | ||
end | ||
end | ||
|
||
describe('icinga2::feature::gelf', :type => :class) do | ||
let(:facts) { { | ||
:kernel => 'Windows', | ||
:architecture => 'x86_64', | ||
:osfamily => 'Windows', | ||
:operatingsystem => 'Windows', | ||
:operatingsystemmajrelease => '2012 R2', | ||
:path => 'C:\Program Files\Puppet Labs\Puppet\puppet\bin; | ||
C:\Program Files\Puppet Labs\Puppet\facter\bin; | ||
C:\Program Files\Puppet Labs\Puppet\hiera\bin; | ||
C:\Program Files\Puppet Labs\Puppet\mcollective\bin; | ||
C:\Program Files\Puppet Labs\Puppet\bin; | ||
C:\Program Files\Puppet Labs\Puppet\sys\ruby\bin; | ||
C:\Program Files\Puppet Labs\Puppet\sys\tools\bin; | ||
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem; | ||
C:\Windows\System32\WindowsPowerShell\v1.0\; | ||
C:\ProgramData\chocolatey\bin;', | ||
} } | ||
|
||
context "Windows 2012 R2 icinga2_puppet_localcacert fact" do | ||
it { expect(Facter.fact(:icinga2_puppet_localcacert).value).to match(/\/ssl\/certs\/.*.pem/) } | ||
end | ||
|
||
end |