add unit test for listcontainer and listpodsandbox

Signed-off-by: yanxuean <yan.xuean@zte.com.cn>
This commit is contained in:
yanxuean
2017-11-07 14:04:02 +08:00
parent 6234337459
commit 12bbbc0edc
3 changed files with 173 additions and 42 deletions

View File

@@ -283,7 +283,7 @@ func TestContainerListStatsWithIdSandboxIdFilter(t *testing.T) {
return false, err
}
if len(stats) != 1 {
return false, fmt.Errorf("Unexpected stats length")
return false, fmt.Errorf("unexpected stats length")
}
if stats[0].GetWritableLayer().GetUsedBytes().GetValue() != 0 &&
stats[0].GetWritableLayer().GetInodesUsed().GetValue() != 0 {
@@ -306,7 +306,7 @@ func TestContainerListStatsWithIdSandboxIdFilter(t *testing.T) {
return false, err
}
if len(stats) != 1 {
return false, fmt.Errorf("Unexpected stats length")
return false, fmt.Errorf("unexpected stats length")
}
if stats[0].GetWritableLayer().GetUsedBytes().GetValue() != 0 &&
stats[0].GetWritableLayer().GetInodesUsed().GetValue() != 0 {