Merge lp:~mvo/snappy/snappy-lp1459212-check-required-fields into lp:~snappy-dev/snappy/snappy-moved-to-github
| Status: | Merged |
|---|---|
| Approved by: | Michael Vogt on 2015-06-09 |
| Approved revision: | 484 |
| Merged at revision: | 498 |
| Proposed branch: | lp:~mvo/snappy/snappy-lp1459212-check-required-fields |
| Merge into: | lp:~snappy-dev/snappy/snappy-moved-to-github |
| Diff against target: |
577 lines (+179/-37) 9 files modified
helpers/helpers.go (+10/-0) helpers/helpers_test.go (+15/-0) snappy/click_test.go (+49/-10) snappy/config_test.go (+2/-0) snappy/install_test.go (+1/-1) snappy/parts_test.go (+1/-1) snappy/purge_test.go (+1/-1) snappy/snapp.go (+42/-18) snappy/snapp_test.go (+58/-6) |
| To merge this branch: | bzr merge lp:~mvo/snappy/snappy-lp1459212-check-required-fields |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Michael Vogt | Approve on 2015-06-09 | ||
| Michael Terry (community) | 2015-05-28 | Approve on 2015-06-08 | |
|
Review via email:
|
|||
Commit Message
Check the package.yaml for the required fields.
Description of the Change
Tiny branch to check the package.yaml for the required fields. Open for
ideas about generating the error in a more elegant way.
| Sergio Schvezov (sergiusens) wrote : | # |
| Michael Vogt (mvo) wrote : | # |
Thanks Sergio, I updated the branch and tried to make it nicer. Maybe I went a bit overboard, not sure. You will let me know :)
| Michael Terry (mterry) wrote : | # |
LP doesn't show the diff, so I'll make all comments here.
===
In helpers_test.go:
+ func (ts *HTestSuite) TestGetattr(c *C) {
+ T := struct{
+ S string
There should be a space between struct and the brace. gofmt complains about it.
===
As for the strings.
===
Otherwise, it looks great! Nice collection of validation code into validatePackage
| Michael Vogt (mvo) wrote : | # |
Thanks a bunch! I fixed the go fmt issue and added a extra space for the ", " join. No fancy ngettext() yet ;) The i18n story is something we have not tackled at all yet.
| Michael Terry (mterry) wrote : | # |
Aw, I was going to approve, but now you have conflicts.
| Michael Terry (mterry) wrote : | # |
Oh and you need to update your tests now that there is a space after the comma.
| Michael Vogt (mvo) wrote : | # |
I updated the tests and merged trunk. Should be ready now.
| Snappy Tarmac (snappydevtarmac) wrote : | # |
Attempt to merge into lp:snappy failed due to conflicts:
text conflict in snappy/
- 484. By Michael Vogt on 2015-06-09
-
merged lp:snappy and resolved conflicts


I would check for all the missing fields, append them and then Errorf( ".... %s", strings. Join(missingFie lds, ","))
if len(missingFields) != 0 {
fmt.
}