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

Function TestInvalidLabels

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

Source from the content-addressed store, hash-verified

39}
40
41func TestInvalidLabels(t *testing.T) {
42 addOneStr := "s"
43 maxSizeStr := strings.Repeat("s", maxSize)
44
45 for key, value := range map[string]string{
46 maxSizeStr: addOneStr,
47 } {
48 if err := Validate(key, value); err == nil {
49 t.Fatal("expected invalid error")
50 } else if !errdefs.IsInvalidArgument(err) {
51 t.Fatal("error should be an invalid label error")
52 }
53 }
54}
55
56func TestIsReserved(t *testing.T) {
57 for key, reserved := range map[string]bool{

Callers

nothing calls this directly

Calls 2

FatalMethod · 0.80
ValidateFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…