-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There are a few remaining issues that need to be fixed, where the ruby code is ambiguous, or something else weird is going on.
- Loading branch information
Showing
20 changed files
with
179 additions
and
180 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
["/opt/puppetlabs/mcollective/plugins", "C:/ProgramData/PuppetLabs/mcollective/plugins"].each do |libdir| | ||
['/opt/puppetlabs/mcollective/plugins', 'C:/ProgramData/PuppetLabs/mcollective/plugins'].each do |libdir| | ||
next if $LOAD_PATH.include?(libdir) | ||
next unless File.directory?(libdir) | ||
|
||
$LOAD_PATH << libdir | ||
end | ||
|
||
require "mcollective/util/bolt_support" | ||
require 'mcollective/util/bolt_support' |
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,41 +1,41 @@ | ||
require "spec_helper" | ||
require 'spec_helper' | ||
|
||
describe("choria::broker::service") do | ||
describe('choria::broker::service') do | ||
before(:each) do | ||
Puppet::Parser::Functions.newfunction(:assert_private, :type => :rvalue) {|_| } | ||
Puppet::Parser::Functions.newfunction(:assert_private, type: :rvalue) { |_| } | ||
end | ||
|
||
let(:facts) do | ||
{ | ||
"aio_agent_version" => "1.7.0", | ||
"operatingsystem" => "CentOS", | ||
"osfamily" => "RedHat", | ||
"operatingsystemmajrelease" => "7", | ||
"os" => { | ||
"family" => "RedHat" | ||
} | ||
'aio_agent_version' => '1.7.0', | ||
'operatingsystem' => 'CentOS', | ||
'osfamily' => 'RedHat', | ||
'operatingsystemmajrelease' => '7', | ||
'os' => { | ||
'family' => 'RedHat', | ||
}, | ||
} | ||
end | ||
|
||
context("when present") do | ||
context('when present') do | ||
let(:pre_condition) { 'class {"choria": }' } | ||
|
||
it { should compile.with_all_deps } | ||
it { is_expected.to compile.with_all_deps } | ||
|
||
it "should use the correct ensure value" do | ||
is_expected.to contain_service("choria-broker").with_ensure("running") | ||
is_expected.to contain_service("choria-broker").with_enable(true) | ||
it 'uses the correct ensure value' do | ||
is_expected.to contain_service('choria-broker').with_ensure('running') | ||
is_expected.to contain_service('choria-broker').with_enable(true) | ||
end | ||
end | ||
|
||
context("when absent") do | ||
context('when absent') do | ||
let(:pre_condition) { 'class {"choria": ensure => "absent"}' } | ||
|
||
it { should compile.with_all_deps } | ||
it { is_expected.to compile.with_all_deps } | ||
|
||
it "should use the correct ensure value" do | ||
is_expected.to contain_service("choria-broker").with_ensure("stopped") | ||
is_expected.to contain_service("choria-broker").with_enable(false) | ||
it 'uses the correct ensure value' do | ||
is_expected.to contain_service('choria-broker').with_ensure('stopped') | ||
is_expected.to contain_service('choria-broker').with_enable(false) | ||
end | ||
end | ||
end |
Oops, something went wrong.