func (s *supportedSeriesSuite) TestOSSupportedSeries(c *gc.C) {
	series.SetSeriesVersions(map[string]string{
		"trusty":  "14.04",
		"utopic":  "14.10",
		"win7":    "win7",
		"win81":   "win81",
		"centos7": "centos7",
		"arch":    "rolling",
	})
	supported := series.OSSupportedSeries(os.Ubuntu)
	c.Assert(supported, jc.SameContents, []string{"trusty", "utopic"})
	supported = series.OSSupportedSeries(os.Windows)
	c.Assert(supported, jc.SameContents, []string{"win7", "win81"})
	supported = series.OSSupportedSeries(os.CentOS)
	c.Assert(supported, jc.SameContents, []string{"centos7"})
	supported = series.OSSupportedSeries(os.Arch)
	c.Assert(supported, jc.SameContents, []string{"arch"})
}
Beispiel #2
0
func (s *linuxVersionSuite) SetUpTest(c *gc.C) {
	cleanup := series.SetSeriesVersions(make(map[string]string))
	s.AddCleanup(func(*gc.C) { cleanup() })
}
func (s *supportedSeriesSuite) SetUpTest(c *gc.C) {
	s.cleanup = series.SetSeriesVersions(make(map[string]string))
}