7 Commits

Author SHA1 Message Date
Gabe Rosenhouse
30c99d17cc pkg/skel: plugins now respond to VERSION command
To support CNI spec versioning, plugins must be able to report version
information to container runtimes.
2016-07-14 00:24:32 -04:00
Gabe Rosenhouse
eda79f7645 pkg/skel: improve error message for missing CNI_COMMAND env var
This makes the error message for missing CNI_COMMAND consistent with
that of other required environment variables.
2016-07-14 00:24:32 -04:00
Gabe Rosenhouse
f2b6ec0375 pkg/skel: missing env var log lines appear in stderr
Previously, the log lines appeared in stdout before the JSON encoding of
the error message.  That would break JSON parsing of stdout.  Instead, we use
stderr for these unstructured logs, consistent with the CNI spec.
2016-07-14 00:24:27 -04:00
Gabe Rosenhouse
3c43314926 pkg/skel: refactor to use dependency injection
Extract dependencies on os to enable more complete unit test coverage
2016-07-14 00:06:58 -04:00
Stefan Junker
cfedcfd8f2 skel/test: add case for empty NETNS 2016-05-27 12:26:42 +02:00
Jonathan Boulle
11c0bfada8 *: add missing license headers + check 2016-04-01 15:35:21 +02:00
Stefan Junker
8cc424c5aa pkg/skel: add rudimentary unit tests
This is an attempt to testing the PluginMain() function of the skel pkg.
We should be able to do better by using a mockable interface for the
plugins, but this is a start.
2016-03-18 22:34:29 +01:00