MCPcopy Index your code
hub / github.com/containerd/containerd / TestValidLabels

Function TestValidLabels

pkg/labels/validate_test.go:27–39  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

25)
26
27func TestValidLabels(t *testing.T) {
28 shortStr := "s"
29 longStr := strings.Repeat("s", maxSize-1)
30
31 for key, value := range map[string]string{
32 "some": "value",
33 shortStr: longStr,
34 } {
35 if err := Validate(key, value); err != nil {
36 t.Fatalf("unexpected error: %v != nil", err)
37 }
38 }
39}
40
41func TestInvalidLabels(t *testing.T) {
42 addOneStr := "s"

Callers

nothing calls this directly

Calls 1

ValidateFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…