Closed mdlayher closed 4 years ago
I forgot that t.Cleanup was added in 1.14:
[error]natpmp/client_test.go:219:3: t.Cleanup undefined (type *testing.T has no field or method Cleanup)
I'll change the signature to my older pattern:
c, done := testServer(t)
defer done()
Looks like this is probably a reasonable place to checkpoint the work. I took a look at netcheck and am mulling over some API ideas, but I think I'll open an issue before writing more code to ensure it ends up being something workable. Will squash and merge!
This is very much a WIP and all feedback is welcome. I read a bit of the RFC and implemented request/response serialization and backoff/retry as recommended, but there's probably more intelligent things we can do as well. I've left TODO comments for things I am either unsure of or intend to do.
For now I've only implemented the "get external IP" method, but will take a look at the actual mapping calls once the overall structure is solid.
/cc @danderson @bradfitz @crawshaw