feat(natpmp): rpc error contain all failed attempt messages

This commit is contained in:
Quentin McGaw
2024-01-19 16:37:47 +00:00
parent c826707d42
commit d8b9b2a85b
3 changed files with 98 additions and 8 deletions

View File

@@ -49,7 +49,8 @@ func Test_Client_AddPortMapping(t *testing.T) {
initialConnectionDuration: time.Millisecond,
exchanges: []udpExchange{{close: true}},
err: ErrConnectionTimeout,
errMessage: "executing remote procedure call: connection timeout: after 1ms",
errMessage: "executing remote procedure call: connection timeout: failed attempts: " +
"read udp 127.0.0.1:[1-9][0-9]{0,4}->127.0.0.1:[1-9][0-9]{0,4}: i/o timeout \\(try 1\\)",
},
"add_udp": {
ctx: context.Background(),