diff options
| author | lhchavez <[email protected]> | 2021-09-05 15:44:18 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-09-05 15:44:18 -0700 |
| commit | f1fa96c7b7f548389c7560d3a1a0bce83be56c9f (patch) | |
| tree | d78a98f00e1d1e1419ca14223784f15db2de2b18 /git_test.go | |
| parent | dbe032c347b1a1308a4b880e7c5a06d8dfb4d507 (diff) | |
Add support for custom smart transports (#806)
This change adds support for git smart transports. This will be then
used to implement http, https, and ssh transports that don't rely on the
libgit2 library.
Diffstat (limited to 'git_test.go')
| -rw-r--r-- | git_test.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/git_test.go b/git_test.go index 1c57f79..101350f 100644 --- a/git_test.go +++ b/git_test.go @@ -13,6 +13,10 @@ import ( func TestMain(m *testing.M) { ret := m.Run() + if err := unregisterManagedTransports(); err != nil { + panic(err) + } + // Ensure that we are not leaking any pointer handles. pointerHandles.Lock() if len(pointerHandles.handles) > 0 { @@ -23,6 +27,16 @@ func TestMain(m *testing.M) { } pointerHandles.Unlock() + // Or remote pointers. + remotePointers.Lock() + if len(remotePointers.pointers) > 0 { + for ptr, remote := range remotePointers.pointers { + fmt.Printf("%016p: %+v\n", ptr, remote) + } + panic("remote pointer list not empty") + } + remotePointers.Unlock() + Shutdown() os.Exit(ret) |
