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

Function TestReadFileStdin

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

Source from the content-addressed store, hash-verified

136}
137
138func TestReadFileStdin(t *testing.T) {
139 content := []byte("my file content")
140 mockStdin, cleanup := newFile(t, content)
141 defer cleanup()
142 defer setStdin(mockStdin)()
143
144 b, err := ReadFile(stdinFilename)
145 require.NoError(t, err)
146 require.True(t, bytes.Equal(content, b), "expected %s to equal %s", b, content)
147}
148
149func TestReadPasswordFromFile(t *testing.T) {
150 content := []byte("my-password-on-file\n")

Callers

nothing calls this directly

Calls 3

newFileFunction · 0.85
setStdinFunction · 0.85
ReadFileFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…