MCPcopy Create free account
hub / github.com/coder/envbuilder / mustRead

Function mustRead

git/git_test.go:527–534  ·  view source on GitHub ↗
(t *testing.T, fs billy.Filesystem, path string)

Source from the content-addressed store, hash-verified

525}
526
527func mustRead(t *testing.T, fs billy.Filesystem, path string) string {
528 t.Helper()
529 f, err := fs.OpenFile(path, os.O_RDONLY, 0o644)
530 require.NoError(t, err)
531 content, err := io.ReadAll(f)
532 require.NoError(t, err)
533 return string(content)
534}
535
536// generates a random ed25519 private key
537func randKeygen(t *testing.T) gossh.Signer {

Callers 2

TestCloneRepoFunction · 0.85
TestCloneRepoSSHFunction · 0.85

Calls 1

OpenFileMethod · 0.65

Tested by

no test coverage detected