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
commit e852da5855
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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