summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrien Thebo <adrien@puppetlabs.com>2011-03-22 12:40:16 -0700
committerAdrien Thebo <adrien.thebo@gmail.com>2011-04-01 21:06:00 -0700
commit7f3e89de2d9da14bc7bef33709b79f48434eec6a (patch)
tree7992fbb5ad80fbe1ec5ca8a971fecb720ce36a68
parentbfc16f6bb9ffbd0064300e647481aab83b7f6212 (diff)
downloadfacter-7f3e89de2d9da14bc7bef33709b79f48434eec6a.tar.gz
facter-7f3e89de2d9da14bc7bef33709b79f48434eec6a.tar.xz
facter-7f3e89de2d9da14bc7bef33709b79f48434eec6a.zip
(#2714) Fixed faulty test
- Looks like some copy/paste added some linux tests that relied on prtdiag, which isn't possible. Corrected them to check against solaris.
-rw-r--r--spec/unit/virtual_spec.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/unit/virtual_spec.rb b/spec/unit/virtual_spec.rb
index ac0a9bb..d169192 100644
--- a/spec/unit/virtual_spec.rb
+++ b/spec/unit/virtual_spec.rb
@@ -121,8 +121,10 @@ describe "Virtual fact" do
Facter.fact(:virtual).value.should == "virtualbox"
end
+ end
+ describe "on Solaris" do
it "should be vmware with VMWare vendor name from prtdiag" do
- Facter.fact(:kernel).stubs(:value).returns("Linux")
+ Facter.fact(:kernel).stubs(:value).returns("SunOS")
Facter::Util::Resolution.stubs(:exec).with('lspci').returns(nil)
Facter::Util::Resolution.stubs(:exec).with('dmidecode').returns(nil)
Facter::Util::Resolution.stubs(:exec).with('prtdiag').returns("System Configuration: VMware, Inc. VMware Virtual Platform")
@@ -130,7 +132,7 @@ describe "Virtual fact" do
end
it "should be parallels with Parallels vendor name from prtdiag" do
- Facter.fact(:kernel).stubs(:value).returns("Linux")
+ Facter.fact(:kernel).stubs(:value).returns("SunOS")
Facter::Util::Resolution.stubs(:exec).with('lspci').returns(nil)
Facter::Util::Resolution.stubs(:exec).with('dmidecode').returns(nil)
Facter::Util::Resolution.stubs(:exec).with('prtdiag').returns("System Configuration: Parallels Virtual Platform")
@@ -138,7 +140,7 @@ describe "Virtual fact" do
end
it "should be virtualbox with VirtualBox vendor name from prtdiag" do
- Facter.fact(:kernel).stubs(:value).returns("Linux")
+ Facter.fact(:kernel).stubs(:value).returns("SunOS")
Facter::Util::Resolution.stubs(:exec).with('lspci').returns(nil)
Facter::Util::Resolution.stubs(:exec).with('dmidecode').returns(nil)
Facter::Util::Resolution.stubs(:exec).with('prtdiag').returns("System Configuration: innotek GmbH VirtualBox")