MCPcopy Index your code
hub / github.com/coder/coder / WithKeyringServiceName

Method WithKeyringServiceName

cli/root.go:906–908  ·  view source on GitHub ↗

WithKeyringServiceName sets a custom keyring service name for testing purposes. This allows tests to use isolated keyring storage while still exercising the genuine storage backend selection logic in ensureTokenBackend().

(serviceName string)

Source from the content-addressed store, hash-verified

904// This allows tests to use isolated keyring storage while still exercising the
905// genuine storage backend selection logic in ensureTokenBackend().
906func (r *RootCmd) WithKeyringServiceName(serviceName string) {
907 r.keyringServiceName = serviceName
908}
909
910// UseKeyringWithGlobalConfig enables the use of the keyring storage backend
911// when the --global-config directory is set. This is only intended as an override

Callers 2

setupKeyringTestEnvFunction · 0.95
TestUseKeyringFunction · 0.95

Calls

no outgoing calls

Tested by 2

setupKeyringTestEnvFunction · 0.76
TestUseKeyringFunction · 0.76