[Pkg-puppet-devel] [facter] 335/352: (maint) Update solaris zone facts to use .execute
Stig Sandbeck Mathisen
ssm at debian.org
Sun Apr 6 22:21:59 UTC 2014
This is an automated email from the git hooks/post-receive script.
ssm pushed a commit to branch master
in repository facter.
commit 548fb2fe12913feba5fbd7ed788ef3a93252f65f
Author: Adrien Thebo <git at somethingsinistral.net>
Date: Mon Mar 24 15:00:31 2014 -0700
(maint) Update solaris zone facts to use .execute
---
lib/facter/util/solaris_zones.rb | 2 +-
spec/unit/util/solaris_zones_spec.rb | 10 +++++-----
spec/unit/zones_spec.rb | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/lib/facter/util/solaris_zones.rb b/lib/facter/util/solaris_zones.rb
index e0c4d5e..df9d661 100644
--- a/lib/facter/util/solaris_zones.rb
+++ b/lib/facter/util/solaris_zones.rb
@@ -93,7 +93,7 @@ module Util
#
# @return [Hash] the parsed output of the zoneadm command
def refresh
- @zoneadm_output = Facter::Core::Execution.exec(zoneadm_cmd, {:on_fail => nil})
+ @zoneadm_output = Facter::Core::Execution.execute(zoneadm_cmd, {:on_fail => nil})
parse!
end
diff --git a/spec/unit/util/solaris_zones_spec.rb b/spec/unit/util/solaris_zones_spec.rb
index c444c8e..6eb9388 100644
--- a/spec/unit/util/solaris_zones_spec.rb
+++ b/spec/unit/util/solaris_zones_spec.rb
@@ -47,7 +47,7 @@ describe Facter::Util::SolarisZones do
describe '#refresh' do
it 'executes the zoneadm_cmd' do
- Facter::Core::Execution.expects(:exec).with(subject.zoneadm_cmd, {:on_fail => nil}).returns(zone_list)
+ Facter::Core::Execution.expects(:execute).with(subject.zoneadm_cmd, {:on_fail => nil}).returns(zone_list)
subject.refresh
end
end
@@ -69,7 +69,7 @@ describe Facter::Util::SolarisZones do
it 'uses a single read of the system information for all of the dynamically generated zone facts' do
given_initial_zone_facts # <= single read happens here
- Facter::Core::Execution.expects(:exec).never
+ Facter::Core::Execution.expects(:execute).never
Facter.fact(:zone_zoneA_id).value
Facter.fact(:zone_local_id).value
end
@@ -101,7 +101,7 @@ describe Facter::Util::SolarisZones do
given_initial_zone_facts
when_facts_have_been_resolved_then_flushed
- Facter::Core::Execution.expects(:exec).once.returns(zone_list2)
+ Facter::Core::Execution.expects(:execute).once.returns(zone_list2)
Facter.fact(:zones).value
Facter.fact(:zone_zoneA_id).value
Facter.fact(:zone_local_id).value
@@ -111,7 +111,7 @@ describe Facter::Util::SolarisZones do
end
def given_initial_zone_facts
- Facter::Core::Execution.stubs(:exec).
+ Facter::Core::Execution.stubs(:execute).
with(subject.zoneadm_cmd, {:on_fail => nil}).
returns(zone_list)
described_class.add_facts
@@ -121,7 +121,7 @@ describe Facter::Util::SolarisZones do
Facter.fact(:zones).value
Facter.fact(:zone_zoneA_id).value
Facter.fact(:zone_local_id).value
- Facter::Core::Execution.stubs(:exec).returns(zone_list2)
+ Facter::Core::Execution.stubs(:execute).returns(zone_list2)
Facter.flush
end
end
diff --git a/spec/unit/zones_spec.rb b/spec/unit/zones_spec.rb
index 11563f4..dd6a353 100644
--- a/spec/unit/zones_spec.rb
+++ b/spec/unit/zones_spec.rb
@@ -10,7 +10,7 @@ describe "on Solaris" do
-:local:configured:/::native:shared
-:zoneA:stopped:/::native:shared
EOF
- Facter::Core::Execution.stubs(:exec).with('/usr/sbin/zoneadm list -cp', {:on_fail => nil}).returns(zone_list)
+ Facter::Core::Execution.stubs(:execute).with('/usr/sbin/zoneadm list -cp', {:on_fail => nil}).returns(zone_list)
Facter.collection.internal_loader.load(:zones)
end
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-puppet/facter.git
More information about the Pkg-puppet-devel
mailing list