File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,8 @@ def read_environ(fact_name)
5151 vm = 'podman'
5252 when 'crio'
5353 vm = 'crio'
54+ when 'zone'
55+ return nil
5456 when 'systemd-nspawn'
5557 vm = 'systemd_nspawn'
5658 info = { 'id' => Facter ::Util ::FileHelper . safe_read ( '/etc/machine-id' , nil ) . strip }
Original file line number Diff line number Diff line change 9292 end
9393 end
9494
95+ context 'when hypervisor is illumos' do
96+ let ( :cgroup_output ) { nil }
97+ let ( :environ_output ) { [ 'container=zone' ] }
98+
99+ it 'return nil' do
100+ expect ( containers_resolver . resolve ( :vm ) ) . to eq ( nil )
101+ expect ( containers_resolver . resolve ( :hypervisor ) ) . to eq ( nil )
102+ end
103+ end
104+
95105 context 'when hypervisor is neighter lxc nor docker' do
96106 let ( :cgroup_output ) { load_fixture ( 'cgroup_file' ) . read }
97107 let ( :environ_output ) { [ 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin' ] }
You can’t perform that action at this time.
0 commit comments