Merge lp:~rvb/gwacl/exclude-daily into lp:gwacl
Proposed by
Raphaël Badin
Status: | Merged |
---|---|
Approved by: | Raphaël Badin |
Approved revision: | 143 |
Merged at revision: | 142 |
Proposed branch: | lp:~rvb/gwacl/exclude-daily |
Merge into: | lp:gwacl |
Diff against target: |
75 lines (+28/-5) 2 files modified
xmlobjects.go (+11/-5) xmlobjects_test.go (+17/-0) |
To merge this branch: | bzr merge lp:~rvb/gwacl/exclude-daily |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gavin Panella | Approve | ||
Review via email: mp+171837@code.launchpad.net |
Commit message
Exclude daily builds from the list of images we are using.
Description of the change
While debugging something today with smoser I found that gwacl is using daily images instead of released images. This is due to the fact that, when GetLatestUbuntu
In the long run, GetLatestUbuntu
This branch changes GetLatestUbuntu
To post a comment you must log in.
Looks good.
[1]
+func (suite *xmlSuite) TestIsDailyBuild(c *C) { test.image. isDailyBuild( ), Equals, test.expectedRe sult)
+ var testValues = []struct {
+ image *OSImage
+ expectedResult bool
+ }{
+ {&OSImage{Label: "Ubuntu Server 12.04.2 LTS DAILY"}, true},
+ {&OSImage{Label: "Ubuntu Server 12.04.2 LTS"}, false},
+ {&OSImage{Label: "Ubuntu Server 13.04"}, false},
+ }
+ for _, test := range testValues {
+ c.Check(
+ }
+}
Go's typing boilerplate makes this much longer and less readable than
doing it the stupid way:
func (suite *xmlSuite) TestIsDailyBuild(c *C) { OSImage{ Label: "Ubuntu Server 12.04.2 LTS DAILY"} .isDailyBuild( ), Equals, true) OSImage{ Label: "Ubuntu Server 12.04.2 LTS"}.isDailyBu ild(), Equals, false), OSImage{ Label: "Ubuntu Server 13.04"} .isDailyBuild( ), Equals, false),
c.Check(
c.Check(
c.Check(
}