[Pkg-puppet-devel] [facter] 106/352: (maint) processorcount on solaris should return a string
Stig Sandbeck Mathisen
ssm at debian.org
Sun Apr 6 22:21:36 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 647c0a449e14aba079cb44aa31119c9ed265c4ca
Author: Adrien Thebo <git at somethingsinistral.net>
Date: Mon Dec 23 13:05:42 2013 -0800
(maint) processorcount on solaris should return a string
---
lib/facter/processor.rb | 2 +-
spec/unit/processor_spec.rb | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/facter/processor.rb b/lib/facter/processor.rb
index b79af2d..586d43d 100644
--- a/lib/facter/processor.rb
+++ b/lib/facter/processor.rb
@@ -178,6 +178,6 @@ Facter.add("ProcessorCount") do
end
end
- result
+ result.to_s
end
end
diff --git a/spec/unit/processor_spec.rb b/spec/unit/processor_spec.rb
index 6dad114..c3894fd 100755
--- a/spec/unit/processor_spec.rb
+++ b/spec/unit/processor_spec.rb
@@ -241,7 +241,7 @@ describe "Processor facts" do
Facter::Util::Resolution.expects(:exec).with("/usr/sbin/psrinfo").never
Facter::Util::Resolution.expects(:exec).with("/usr/bin/kstat cpu_info").returns(self.send("kstat_#{arch}".intern))
- Facter.fact(:processorcount).value.should == 8
+ Facter.fact(:processorcount).value.should == '8'
end
end
end
@@ -253,7 +253,7 @@ describe "Processor facts" do
fixture_data = File.read(fixtures('processorcount','solaris-psrinfo'))
Facter::Util::Resolution.expects(:exec).with("/usr/bin/kstat cpu_info").never
Facter::Util::Resolution.expects(:exec).with("/usr/sbin/psrinfo").returns(fixture_data)
- Facter.fact(:processorcount).value.should == 24
+ Facter.fact(:processorcount).value.should == '24'
end
end
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