File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,8 @@ def read_environ(fact_name)
4545          case  container 
4646          when  'lxc' 
4747            vm  =  'lxc' 
48+           when  'lxc-virtwhat' 
49+             vm  =  'lxc-virtwhat' 
4850          when  'podman' 
4951            vm  =  'podman' 
5052          when  'crio' 
Original file line number Diff line number Diff line change 7878    end 
7979  end 
8080
81+   context  'when hypervisor is lxc-virtwhat and it is discovered by environ'  do 
82+     let ( :cgroup_output )  {  load_fixture ( 'cgroup_file' ) . read  } 
83+     let ( :environ_output )  {  [ 'container=lxc-virtwhat' ]  } 
84+     let ( :result )  {  {  'lxc-virtwhat' : { }  }  } 
85+ 
86+     it  'return lxc-virtwhat for vm'  do 
87+       expect ( containers_resolver . resolve ( :vm ) ) . to  eq ( 'lxc-virtwhat' ) 
88+     end 
89+ 
90+     it  'return lxc-virtwhat info for hypervisor'  do 
91+       expect ( containers_resolver . resolve ( :hypervisor ) ) . to  eq ( result ) 
92+     end 
93+   end 
94+ 
8195  context  'when hypervisor is neighter lxc nor docker'  do 
8296    let ( :cgroup_output )  {  load_fixture ( 'cgroup_file' ) . read  } 
8397    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