Esempio n. 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)
}
Esempio n. 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)
}