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) }
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) }