Exemplo n.º 1
0
func (*kernelVersionSuite) TestMacOSXSeriesFromKernelVersionError(c *gc.C) {
	// We suppress the actual error in favor of returning "unknown", but we
	// do log the error
	series, err := version.MacOSXSeriesFromKernelVersion(sysctlError)
	c.Assert(err, gc.ErrorMatches, "no such syscall")
	c.Assert(series, gc.Equals, "unknown")
	c.Check(c.GetTestLog(), gc.Matches, ".* juju.version unable to determine OS version: no such syscall\n")
}
Exemplo n.º 2
0
func (*kernelVersionSuite) TestMacOSXSeriesFromKernelVersion(c *gc.C) {
	series, err := version.MacOSXSeriesFromKernelVersion(sysctlMacOS10dot9dot2)
	c.Assert(err, jc.ErrorIsNil)
	c.Check(series, gc.Equals, "mavericks")
}
Exemplo n.º 3
0
func (*kernelVersionSuite) TestMacOSXSeriesFromKernelVersion(c *gc.C) {
	c.Check(version.MacOSXSeriesFromKernelVersion(sysctlMacOS10dot9dot2), gc.Equals, "mavericks")
}