Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
testutil,skills/types,skills,daemon: tweak discovery of know skill types #478
Conversation
zyga
added some commits
Feb 12, 2016
|
Merged with master to re-test with integration test fixes |
|
There are two test failures in the integration tests that are worth investigating |
|
@mvo5 we have had this problem before [1] it appears eventually when trying to install a snap from the local filesystem, maybe related to the snap.yaml filled with '\0' |
|
I rerun the tests and its happy again |
niemeyer
reviewed
Feb 23, 2016
| - containerV.Type().Elem(), elemV.Type()) | ||
| - return true | ||
| + containerElemType := containerV.Type().Elem() | ||
| + if containerV.Type().Elem().Kind() == reflect.Interface { |
|
Nice change, LGTM. |
mvo5
reviewed
Feb 25, 2016
| - err = skills.LoadBuiltInTypes(skillRepo) | ||
| - if err != nil { | ||
| - panic(err.Error()) | ||
| + for _, skillType := range types.AllTypes() { |
mvo5
reviewed
Feb 25, 2016
| + | ||
| +func (s *AllSuite) TestAllTypes(c *C) { | ||
| + allTypes := types.AllTypes() | ||
| + c.Check(allTypes, Contains, &types.BoolFileType{}) |
mvo5
Feb 25, 2016
Collaborator
Sorry for being "mr-smarty-pants" here: c.Check(allTypes, DeepEquals, []skills.Type{&types.BoolFileType{}}) would have worked as well. But now Contains knows about interfaces which is nice as well!
mvo5
reviewed
Feb 25, 2016
| @@ -111,12 +146,16 @@ func (s *CheckersS) TestContainsSlice(c *C) { | ||
| c.Assert([]int{1, 2, 3}, Contains, 2) | ||
| c.Assert([]int{1, 2, 3}, Contains, 3) | ||
| c.Assert([]int{1, 2, 3}, Not(Contains), 4) | ||
| + c.Assert([]animal{&dog{}, &cat{}}, Contains, &dog{}) |
|
Looks good! |
added a commit
that referenced
this pull request
Feb 25, 2016
mvo5
merged commit d2ac5ee
into
snapcore:master
Feb 25, 2016
zyga
deleted the
zyga:skill-type-registry
branch
Mar 8, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
zyga commentedFeb 12, 2016
This branch moves the discovery of known skill types from skills/ to skills/types.