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

Function TestReadFile

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

Source from the content-addressed store, hash-verified

126}
127
128func TestReadFile(t *testing.T) {
129 content := []byte("my file content")
130 f, cleanup := newFile(t, content)
131 defer cleanup()
132
133 b, err := ReadFile(f.Name())
134 require.NoError(t, err)
135 require.True(t, bytes.Equal(content, b), "expected %s to equal %s", b, content)
136}
137
138func TestReadFileStdin(t *testing.T) {
139 content := []byte("my file content")

Callers

nothing calls this directly

Calls 2

newFileFunction · 0.85
ReadFileFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…