Add unit test.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2017-05-31 17:14:41 +00:00
parent 7c1a4c1fc1
commit 2df96e1654
6 changed files with 292 additions and 1 deletions

View File

@@ -168,7 +168,10 @@ func (f *FakeCNIPlugin) GetContainerNetworkStatus(netnsPath string, namespace st
// Status get the status of the plugin.
func (f *FakeCNIPlugin) Status() error {
return nil
f.Lock()
defer f.Unlock()
f.appendCalled("Status", nil)
return f.getError("Status")
}
func generateIP() string {