MCPcopy Index your code
hub / github.com/cli/cli / Test_ValidateKey

Function Test_ValidateKey

pkg/cmd/config/set/set_test.go:178–199  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

176}
177
178func Test_ValidateKey(t *testing.T) {
179 err := ValidateKey("invalid")
180 assert.EqualError(t, err, "invalid key")
181
182 err = ValidateKey("git_protocol")
183 assert.NoError(t, err)
184
185 err = ValidateKey("editor")
186 assert.NoError(t, err)
187
188 err = ValidateKey("prompt")
189 assert.NoError(t, err)
190
191 err = ValidateKey("pager")
192 assert.NoError(t, err)
193
194 err = ValidateKey("http_unix_socket")
195 assert.NoError(t, err)
196
197 err = ValidateKey("browser")
198 assert.NoError(t, err)
199}

Callers

nothing calls this directly

Calls 1

ValidateKeyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…