Configurable commands#117
Conversation
a82145c to
68c63e1
Compare
|
I fixed test code not to depend on order of map keys. |
bb6b38d to
a169e54
Compare
| // TODO: sub commands should be configurable | ||
| if len(config.SubCommands) == 0 { | ||
| config.SubCommands = map[string]commandDetail{} | ||
| for _, sub := range sensorBeeDefaultCommands { |
There was a problem hiding this comment.
I think everybody knows that this file is cmd/build_sensorbee/main.go, so defaultCommands should be ok.
| So(string(b), ShouldEqual, expectedMainFile) | ||
| }) | ||
| }) | ||
| }) |
There was a problem hiding this comment.
How about adding a test using multiple SubCommands? It doesn't have to perform an exact match of the contents but only needs to look up substrings like repo1 "path/to/repo" (possibly with regexp) to see if all subcommands are correctly imported.
There was a problem hiding this comment.
I separate to 2 test cases.
1st., a created main file is exactly match or not when configuration includes a plugin and a command.
2nd., a created main file has custom-command string or not with command configurations.
|
On travis-ci test, go1.4.3 is failed to build, but the failure is not related to this PR. Latest ugorji/go includes a function which is added from go1.5~ ( ugorji/go@5099b68 ). |
|
OK, let's set some official policy regarding which version of Go SensorBee supports. I think supporting latest three major versions (e.g. 1.7, 1.6, and 1.5 for now) is fine. |
|
I mean, minor versions :) |
|
I think your proposal is good and will make issue about supported versions of Go, thanks. |
refs #114