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 @@ -49,6 +49,8 @@ def read_environ(fact_name)
4949 vm = 'podman'
5050 when 'crio'
5151 vm = 'crio'
52+ when 'zone'
53+ return nil
5254 when 'systemd-nspawn'
5355 vm = 'systemd_nspawn'
5456 info = { 'id' => Facter ::Util ::FileHelper . safe_read ( '/etc/machine-id' , nil ) . strip }
Original file line number Diff line number Diff line change 7878 end
7979 end
8080
81+ context 'when hypervisor is illumos' do
82+ let ( :cgroup_output ) { nil }
83+ let ( :environ_output ) { [ 'container=zone' ] }
84+
85+ it 'return nil' do
86+ expect ( containers_resolver . resolve ( :vm ) ) . to eq ( nil )
87+ expect ( containers_resolver . resolve ( :hypervisor ) ) . to eq ( nil )
88+ end
89+ end
90+
8191 context 'when hypervisor is neighter lxc nor docker' do
8292 let ( :cgroup_output ) { load_fixture ( 'cgroup_file' ) . read }
8393 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