Merge pull request #4135 from hs0210/work

Add unit test for func in remotes/docker/handler.go
This commit is contained in:
Phil Estes
2020-03-31 15:06:58 -04:00
committed by GitHub

View File

@@ -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)
}
}