Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
protocols: fix client unit tests for go 1.13
Browse files Browse the repository at this point in the history
The way to parse URLs in Go 1.13 has changed, now the `url.Parse` validates
that the port is only decimals, so the content of the error message when a
invalid port is used will change from "Invalid vsock port" to "invalid port",
hence the expected error message in the unit tests must change.

For more information about the change in Golang 1.13 see:
golang/go@61bb56a

fixes #772

Signed-off-by: Julio Montes <[email protected]>
  • Loading branch information
Julio Montes committed Apr 17, 2020
1 parent 5bf8d4c commit 305c6f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions protocols/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func TestNewAgentClient(t *testing.T) {
cliFunc(mockBadSchemeAddr, false, "Invalid scheme:")
cliFunc(mockBadVsockScheme, false, "Invalid vsock scheme:")
cliFunc(mockVsockBadCid, false, "Invalid vsock cid")
cliFunc(mockVsockBadPort, false, "Invalid vsock port")
cliFunc(mockVsockBadPort, false, "invalid port")
cliFunc(mockFakeVsockAddr, false, "context deadline exceeded")

// wait mock server to stop
Expand All @@ -153,7 +153,7 @@ func TestNewAgentClientWithYamux(t *testing.T) {
cliFunc(mockBadSchemeAddr, false, "Invalid scheme:")
cliFunc(mockBadVsockScheme, false, "Invalid vsock scheme:")
cliFunc(mockVsockBadCid, false, "Invalid vsock cid")
cliFunc(mockVsockBadPort, false, "Invalid vsock port")
cliFunc(mockVsockBadPort, false, "invalid port")
cliFunc(mockFakeVsockAddr, false, "context deadline exceeded")

// wait mock server to stop
Expand Down

0 comments on commit 305c6f9

Please sign in to comment.