MCPcopy Index your code
hub / github.com/smallstep/cli / TestStringReadPasswordFromFile

Function TestStringReadPasswordFromFile

utils/read_test.go:159–167  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

157}
158
159func TestStringReadPasswordFromFile(t *testing.T) {
160 content := []byte("my-password-on-file\n")
161 f, cleanup := newFile(t, content)
162 defer cleanup()
163
164 s, err := ReadStringPasswordFromFile(f.Name())
165 require.NoError(t, err)
166 require.Equal(t, "my-password-on-file", s, "expected %s to equal %s", s, content)
167}
168
169func TestReadInput(t *testing.T) {
170 type args struct {

Callers

nothing calls this directly

Calls 2

newFileFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…