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:
parent
0300fa7f80
commit
c72112b171
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue