Add unit test for func in remotes/docker/handler.go
Signed-off-by: Hu Shuai <hus.fnst@cn.fujitsu.com>
This commit is contained in:
parent
a83927d5f1
commit
c8d9c6f2a6
@ -65,3 +65,10 @@ func TestAppendDistributionLabel(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestDistributionSourceLabelKey(t *testing.T) {
|
||||||
|
expected := "containerd.io/distribution.source.testsource"
|
||||||
|
if got := distributionSourceLabelKey("testsource"); !reflect.DeepEqual(got, expected) {
|
||||||
|
t.Fatalf("expected %v, but got %v", expected, got)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user