(t *testing.T)
| 60 | } |
| 61 | |
| 62 | func TestFindOriginCert_Valid(t *testing.T) { |
| 63 | file, err := os.ReadFile("test-cloudflare-tunnel-cert-json.pem") |
| 64 | require.NoError(t, err) |
| 65 | dir := t.TempDir() |
| 66 | certPath := filepath.Join(dir, originCertFile) |
| 67 | _ = os.WriteFile(certPath, file, fs.ModePerm) |
| 68 | path, err := FindOriginCert(certPath, &nopLog) |
| 69 | require.NoError(t, err) |
| 70 | require.Equal(t, certPath, path) |
| 71 | } |
| 72 | |
| 73 | func TestFindOriginCert_Missing(t *testing.T) { |
| 74 | dir := t.TempDir() |
nothing calls this directly
no test coverage detected