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

Merge pull request #34849 from chchliang/testlayer

add testcase in layer/empty_test.go with Platform(),Metadata()
This commit is contained in:
Yong Tang 2017-09-15 06:39:20 -07:00 committed by GitHub
commit 5c10698d5c

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)