예제 #1
0
func (s *LxcSuite) TestIsLXCSupportedOnLXCContainer(c *gc.C) {
	s.PatchValue(lxc.RunningInsideLXC, func() (bool, error) {
		return true, nil
	})
	supports, err := lxc.IsLXCSupported()
	c.Assert(err, jc.ErrorIsNil)
	c.Assert(supports, jc.IsFalse)
}
예제 #2
0
func (s *LxcSuite) TestIsLXCSupportedNonLinuxSystem(c *gc.C) {
	s.PatchValue(lxc.RuntimeGOOS, "windows")
	s.PatchValue(lxc.RunningInsideLXC, func() (bool, error) {
		panic("should not be called")
	})
	supports, err := lxc.IsLXCSupported()
	c.Assert(err, jc.ErrorIsNil)
	c.Assert(supports, jc.IsFalse)
}