File tree 2 files changed +6
-1
lines changed
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 149
149
next "xenhvm" if lines . any? { |l | l =~ /XenSource/ }
150
150
next "hyperv" if lines . any? { |l | l =~ /Microsoft Corporation Hyper-V/ }
151
151
next "gce" if lines . any? { |l | l =~ /Class 8007: Google, Inc/ }
152
- next "kvm" if lines . any? { |l | l =~ /virtio/ }
152
+ next "kvm" if lines . any? { |l | l =~ /virtio/i }
153
153
end
154
154
155
155
# Parse dmidecode
Original file line number Diff line number Diff line change 210
210
Facter . fact ( :virtual ) . value . should == "hyperv"
211
211
end
212
212
213
+ it "should be kvm with virtio device lspci 2>/dev/null" do
214
+ Facter ::Util ::Virtual . expects ( :lspci ) . returns ( "00:03.0 Ethernet controller: Red Hat, Inc Virtio network device" )
215
+ Facter . fact ( :virtual ) . value . should == "kvm"
216
+ end
217
+
213
218
context "In a Linux Container (LXC)" do
214
219
before :each do
215
220
Facter . fact ( :kernel ) . stubs ( :value ) . returns ( "Linux" )
You can’t perform that action at this time.
0 commit comments