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

Function writeTestPrivateKey

git/git_test.go:556–562  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

554-----END OPENSSH PRIVATE KEY-----`
555
556func writeTestPrivateKey(t *testing.T) string {
557 t.Helper()
558 tmpDir := t.TempDir()
559 kPath := filepath.Join(tmpDir, "test.key")
560 require.NoError(t, os.WriteFile(kPath, []byte(testKey), 0o600))
561 return kPath
562}
563
564func base64EncodeTestPrivateKey() string {
565 return base64.StdEncoding.EncodeToString([]byte(testKey))

Callers 1

TestSetupRepoAuthFunction · 0.85

Calls 1

JoinMethod · 0.80

Tested by

no test coverage detected