foxcpp / go-mockdns Goto Github PK
View Code? Open in Web Editor NEWBoilerplate for testing of code involving DNS lookups, including unholy hacks to redirect net.Lookup* calls.
License: MIT License
Boilerplate for testing of code involving DNS lookups, including unholy hacks to redirect net.Lookup* calls.
License: MIT License
Hi,
It would be nice to have a tagged version of go-mockdns, to be able to more cleanly import it in go.mod
files and to make sure the API/interaction does't change in the future.
apart from that, great module, thanks ๐๐ป
Aloha again ๐
We've been seeing a lot of these lately on our windows CI build.
It runs without race detector on github actions.
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x1d247ed]
goroutine 10507 [running]:
testing.tRunner.func1.1(0x1f6aa80, 0x1e38850)
C:/hostedtoolcache/windows/go/1.15.8/x64/src/testing/testing.go:1072 +0x310
testing.tRunner.func1(0xc000fd1080)
C:/hostedtoolcache/windows/go/1.15.8/x64/src/testing/testing.go:1075 +0x43a
panic(0x1f6aa80, 0x1e38850)
C:/hostedtoolcache/windows/go/1.15.8/x64/src/runtime/panic.go:969 +0x1c7
github.com/foxcpp/go-mockdns.(*Server).Close(0x0, 0x0, 0x0)
C:/Users/runneradmin/go/pkg/mod/github.com/foxcpp/[email protected]/server.go:414 +0x2d
runtime.Goexit()
C:/hostedtoolcache/windows/go/1.15.8/x64/src/runtime/panic.go:617 +0x1e5
testing.(*common).SkipNow(0xc000fd1080)
C:/hostedtoolcache/windows/go/1.15.8/x64/src/testing/testing.go:832 +0x45
testing.(*common).Skipf(0xc000fd1080, 0x20fc744, 0x24, 0xc000c0fba8, 0x1, 0x1)
C:/hostedtoolcache/windows/go/1.15.8/x64/src/testing/testing.go:818 +0x97
github.com/ethersphere/bee/pkg/p2p/libp2p_test.TestStaticAddressResolver(0xc000fd1080)
D:/a/bee/bee/pkg/p2p/libp2p/static_resolver_test.go:105 +0x525
testing.tRunner(0xc000fd1080, 0x2268a30)
C:/hostedtoolcache/windows/go/1.15.8/x64/src/testing/testing.go:1123 +0xef
created by testing.(*T).Run
C:/hostedtoolcache/windows/go/1.15.8/x64/src/testing/testing.go:1168 +0x2b3
Heya! ๐
We've been having some panics on our CI from the library recently.
Env: Macos github action build, golang go test
suite with race detector on:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x51d2819]
goroutine 10490 [running]:
github.com/foxcpp/go-mockdns.(*Server).PatchNet.func1(0x57deda0, 0xc00010aa20, 0x54de8f6, 0x3, 0xc00010daa0, 0xa, 0x0, 0x0, 0x0, 0x403a0bd)
/Users/runner/go/pkg/mod/github.com/foxcpp/[email protected]/server.go:381 +0x59
net.(*Resolver).dial(0x6016800, 0x57deda0, 0xc00010aa20, 0x54de8f6, 0x3, 0xc00010daa0, 0xa, 0xc000507660, 0x0, 0x0, ...)
/Users/runner/hostedtoolcache/go/1.15.8/x64/src/net/lookup_unix.go:67 +0x334
net.(*Resolver).exchange(0x6016800, 0x57ded20, 0xc000b47400, 0xc00010daa0, 0xa, 0x6d6f632e34767069, 0x2e, 0x0, 0x0, 0x0, ...)
/Users/runner/hostedtoolcache/go/1.15.8/x64/src/net/dnsclient_unix.go:156 +0x2e7
net.(*Resolver).tryOneName(0x6016800, 0x57ded20, 0xc000b47400, 0xc0004c4460, 0xc00010dae0, 0x9, 0xc00000001c, 0x0, 0x0, 0x0, ...)
/Users/runner/hostedtoolcache/go/1.15.8/x64/src/net/dnsclient_unix.go:256 +0x42f
net.(*Resolver).goLookupIPCNAMEOrder.func3.1(0x6016800, 0x57ded20, 0xc000b47400, 0xc0004c4460, 0xc00010dae0, 0x9, 0xc00010a5a0, 0x1c)
/Users/runner/hostedtoolcache/go/1.15.8/x64/src/net/dnsclient_unix.go:602 +0xd2
created by net.(*Resolver).goLookupIPCNAMEOrder.func3
/Users/runner/hostedtoolcache/go/1.15.8/x64/src/net/dnsclient_unix.go:601 +0x105
The v1.0.0 tag is more than two years old and doesn't include LookupNetIP
and LookupIP
.
Could you release the v1.1.0
version?
Thanks!
Thanks for the awesome library!
It's usage could be more extensive if there are options for mockdns.NewServer
to specify server listen addresses (TCP/UDP).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.