(t *testing.T)
| 554 | -----END OPENSSH PRIVATE KEY-----` |
| 555 | |
| 556 | func 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 | |
| 564 | func base64EncodeTestPrivateKey() string { |
| 565 | return base64.StdEncoding.EncodeToString([]byte(testKey)) |
no test coverage detected