MCPcopy Create free account
hub / github.com/docker/secrets-engine / Test_Name

Function Test_Name

x/api/name_test.go:23–34  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

21)
22
23func Test_Name(t *testing.T) {
24 t.Parallel()
25 t.Run("any non-empty string is a valid name", func(t *testing.T) {
26 n, err := NewName("foo")
27 assert.NoError(t, err)
28 assert.Equal(t, "foo", n.String())
29 })
30 t.Run("no empty string", func(t *testing.T) {
31 _, err := NewName("")
32 assert.ErrorIs(t, err, ErrEmptyName)
33 })
34}

Callers

nothing calls this directly

Calls 3

StringMethod · 0.95
NewNameFunction · 0.85
RunMethod · 0.65

Tested by

no test coverage detected