Skip to content

Commit

Permalink
Merge pull request #27 from SimonRichardson/update-supported-series
Browse files Browse the repository at this point in the history
#27

It pains me everytime I edit this repo for series updates, this
shouldn't be in a library it should be tied to a juju release, which
means it should be in the juju repo.
  • Loading branch information
jujubot authored Oct 29, 2020
2 parents 9ea36b3 + 3611fd7 commit 68703c0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
8 changes: 6 additions & 2 deletions series/supportedseries.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ var seriesVersions = map[string]string{
"eoan": "19.10",
"focal": "20.04",
"groovy": "20.10",
"hirsute": "21.04",
"win2008r2": "win2008r2",
"win2012hvr2": "win2012hvr2",
"win2012hv": "win2012hv",
Expand Down Expand Up @@ -192,8 +193,7 @@ var ubuntuSeries = map[string]seriesVersion{
Version: "19.04",
},
"eoan": {
Version: "19.10",
Supported: true,
Version: "19.10",
},
"focal": {
Version: "20.04",
Expand All @@ -203,6 +203,10 @@ var ubuntuSeries = map[string]seriesVersion{
},
"groovy": {
Version: "20.10",
Supported: true,
},
"hirsute": {
Version: "21.04",
Supported: false,
},
}
Expand Down
14 changes: 8 additions & 6 deletions series/supportedseries_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (s *supportedSeriesSuite) TestSupportedSeries(c *gc.C) {
c.Assert(err, jc.ErrorIsNil)
s.PatchValue(series.UbuntuDistroInfoPath, filename)

expectedSeries := []string{"artful", "bionic", "cosmic", "disco", "eoan", "focal", "precise", "quantal", "raring", "saucy", "trusty", "utopic", "vivid", "wily", "xenial", "yakkety", "zesty"}
expectedSeries := []string{"artful", "bionic", "cosmic", "disco", "eoan", "focal", "groovy", "hirsute", "precise", "quantal", "raring", "saucy", "trusty", "utopic", "vivid", "wily", "xenial", "yakkety", "zesty"}
series := series.SupportedSeries()
sort.Strings(series)
c.Assert(series, gc.DeepEquals, expectedSeries)
Expand All @@ -49,7 +49,7 @@ func (s *supportedSeriesSuite) TestUpdateSeriesVersions(c *gc.C) {
c.Assert(err, jc.ErrorIsNil)
s.PatchValue(series.UbuntuDistroInfoPath, filename)

expectedSeries := []string{"artful", "bionic", "cosmic", "disco", "eoan", "focal", "precise", "quantal", "raring", "saucy", "trusty", "utopic", "vivid", "wily", "xenial", "yakkety", "zesty"}
expectedSeries := []string{"artful", "bionic", "cosmic", "disco", "eoan", "focal", "groovy", "hirsute", "precise", "quantal", "raring", "saucy", "trusty", "utopic", "vivid", "wily", "xenial", "yakkety", "zesty"}
checkSeries := func() {
series := series.SupportedSeries()
sort.Strings(series)
Expand Down Expand Up @@ -104,7 +104,7 @@ func (s *supportedSeriesSuite) TestSupportedJujuControllerSeries(c *gc.C) {
c.Assert(err, jc.ErrorIsNil)
s.PatchValue(series.UbuntuDistroInfoPath, filename)

expectedSeries := []string{"focal", "bionic", "xenial"}
expectedSeries := []string{"groovy", "focal", "bionic", "xenial"}
series := series.SupportedJujuControllerSeries()
c.Assert(series, jc.DeepEquals, expectedSeries)
}
Expand All @@ -116,7 +116,7 @@ func (s *supportedSeriesSuite) TestSupportedJujuWorkloadSeries(c *gc.C) {
c.Assert(err, jc.ErrorIsNil)
s.PatchValue(series.UbuntuDistroInfoPath, filename)

expectedSeries := []string{"focal", "bionic", "xenial", "centos7", "centos8", "genericlinux", "kubernetes", "opensuseleap", "win10", "win2008r2", "win2012", "win2012hv", "win2012hvr2", "win2012r2", "win2016", "win2016hv", "win2016nano", "win2019", "win7", "win8", "win81"}
expectedSeries := []string{"groovy", "focal", "bionic", "xenial", "centos7", "centos8", "genericlinux", "kubernetes", "opensuseleap", "win10", "win2008r2", "win2012", "win2012hv", "win2012hvr2", "win2012r2", "win2016", "win2016hv", "win2016nano", "win2019", "win7", "win8", "win81"}
series := series.SupportedJujuWorkloadSeries()
c.Assert(series, jc.DeepEquals, expectedSeries)
}
Expand All @@ -128,7 +128,7 @@ func (s *supportedSeriesSuite) TestSupportedJujuSeries(c *gc.C) {
c.Assert(err, jc.ErrorIsNil)
s.PatchValue(series.UbuntuDistroInfoPath, filename)

expectedSeries := []string{"focal", "bionic", "xenial", "centos7", "centos8", "genericlinux", "kubernetes", "opensuseleap", "win10", "win2008r2", "win2012", "win2012hv", "win2012hvr2", "win2012r2", "win2016", "win2016hv", "win2016nano", "win2019", "win7", "win8", "win81"}
expectedSeries := []string{"groovy", "focal", "bionic", "xenial", "centos7", "centos8", "genericlinux", "kubernetes", "opensuseleap", "win10", "win2008r2", "win2012", "win2012hv", "win2012hvr2", "win2012r2", "win2016", "win2016hv", "win2016nano", "win2019", "win7", "win8", "win81"}
series := series.SupportedJujuSeries()
c.Assert(series, jc.DeepEquals, expectedSeries)
}
Expand Down Expand Up @@ -198,6 +198,8 @@ const distInfoData = `version,codename,series,created,release,eol,eol-server,eol
19.04,Disco Dingo,disco,2018-10-18,2019-04-18,2020-01-18
19.10,Eoan Ermine,eoan,2019-04-18,2019-10-17,2020-07-17
20.04 LTS,Focal Fossa,focal,2019-10-17,2020-04-23,2025-04-23,2025-04-23,2030-04-23
20.10,Groovy Gorilla,groovy,2020-04-23,2020-10-22,2021-07-22
21.04,Hirsute HANIMAL,hirsute,2020-10-22,2021-04-22,2022-01-22
`

const distInfoData2 = distInfoData + `
Expand All @@ -216,7 +218,7 @@ func (s *isolationSupportedSeriesSuite) TestBadFilePath(c *gc.C) {
filename := filepath.Join(d, "bad-file.csv")
s.PatchValue(series.UbuntuDistroInfoPath, filename)

expectedSeries := []string{"artful", "bionic", "centos7", "centos8", "cosmic", "disco", "eoan", "focal", "genericlinux", "groovy", "opensuseleap", "precise", "quantal", "raring", "saucy", "trusty", "utopic", "vivid", "wily", "win10", "win2008r2", "win2012", "win2012hv", "win2012hvr2", "win2012r2", "win2016", "win2016hv", "win2016nano", "win2019", "win7", "win8", "win81", "xenial", "yakkety", "zesty"}
expectedSeries := []string{"artful", "bionic", "centos7", "centos8", "cosmic", "disco", "eoan", "focal", "genericlinux", "groovy", "hirsute", "opensuseleap", "precise", "quantal", "raring", "saucy", "trusty", "utopic", "vivid", "wily", "win10", "win2008r2", "win2012", "win2012hv", "win2012hvr2", "win2012r2", "win2016", "win2016hv", "win2016nano", "win2019", "win7", "win8", "win81", "xenial", "yakkety", "zesty"}
series := series.SupportedSeries()
sort.Strings(series)
c.Assert(series, gc.DeepEquals, expectedSeries)
Expand Down

0 comments on commit 68703c0

Please sign in to comment.