1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

add testcase in layer/empty_test.go with Metadata()

Signed-off-by: chchliang <chen.chuanliang@zte.com.cn>
This commit is contained in:
chchliang 2017-09-14 14:15:23 +08:00
parent 0300fa7f80
commit c72112b171

View file

@ -28,6 +28,12 @@ func TestEmptyLayer(t *testing.T) {
t.Fatal("expected zero diffsize for empty layer")
}
meta, err := EmptyLayer.Metadata()
if len(meta) != 0 || err != nil {
t.Fatal("expected zero length metadata for empty layer")
}
tarStream, err := EmptyLayer.TarStream()
if err != nil {
t.Fatalf("error streaming tar for empty layer: %v", err)