Skip to content

Commit e852da5

Browse files
authored
Merge pull request containerd#4135 from hs0210/work
Add unit test for func in remotes/docker/handler.go
2 parents a83927d + c8d9c6f commit e852da5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

remotes/docker/handler_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,10 @@ func TestAppendDistributionLabel(t *testing.T) {
6565
}
6666
}
6767
}
68+
69+
func TestDistributionSourceLabelKey(t *testing.T) {
70+
expected := "containerd.io/distribution.source.testsource"
71+
if got := distributionSourceLabelKey("testsource"); !reflect.DeepEqual(got, expected) {
72+
t.Fatalf("expected %v, but got %v", expected, got)
73+
}
74+
}

0 commit comments

Comments
 (0)