(t *testing.T)
| 48 | } |
| 49 | |
| 50 | func TestCertificateCheck(t *testing.T) { |
| 51 | t.Parallel() |
| 52 | repo := createTestRepo(t) |
| 53 | defer cleanupTestRepo(t, repo) |
| 54 | |
| 55 | remote, err := repo.Remotes.Create("origin", "https://github.com/libgit2/TestGitRepository") |
| 56 | checkFatal(t, err) |
| 57 | defer remote.Free() |
| 58 | |
| 59 | options := FetchOptions{ |
| 60 | RemoteCallbacks: RemoteCallbacks{ |
| 61 | CertificateCheckCallback: func(cert *Certificate, valid bool, hostname string) error { |
| 62 | return assertHostname(cert, valid, hostname, t) |
| 63 | }, |
| 64 | }, |
| 65 | } |
| 66 | |
| 67 | err = remote.Fetch([]string{}, &options, "") |
| 68 | checkFatal(t, err) |
| 69 | } |
| 70 | |
| 71 | func TestRemoteConnect(t *testing.T) { |
| 72 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…