From 506fdadaa6fb06aa21d8b0c02aa8a6366337aa51 Mon Sep 17 00:00:00 2001 From: GrĂ©goire DuchĂȘne Date: Sun, 2 Oct 2022 14:52:02 +0100 Subject: Use signal values from syscall There is no change in API or behavior. --- pipeln_test.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'pipeln_test.go') diff --git a/pipeln_test.go b/pipeln_test.go index dcbeb22..3b822b2 100644 --- a/pipeln_test.go +++ b/pipeln_test.go @@ -5,10 +5,9 @@ package pipeln import ( "context" "net/http" + "syscall" "testing" - "golang.org/x/sys/unix" - "go.awhk.org/core" ) @@ -33,18 +32,18 @@ func Test(s *testing.T) { t.Run("Address Mismatch", func(t *core.T) { _, err := client.Get("http://other-test/endpoint") - t.AssertErrorIs(unix.EINVAL, err) + t.AssertErrorIs(syscall.EINVAL, err) }) srv.Shutdown(context.Background()) t.Run("Remote Connection Closed", func(t *core.T) { _, err := client.Get("http://test/endpoint") - t.AssertErrorIs(unix.ECONNREFUSED, err) + t.AssertErrorIs(syscall.ECONNREFUSED, err) }) t.Run("Already-closed Listener", func(t *core.T) { srv = http.Server{Handler: mux} - t.AssertErrorIs(unix.EINVAL, srv.Serve(ln)) + t.AssertErrorIs(syscall.EINVAL, srv.Serve(ln)) }) } -- cgit v1.2.3-70-g09d2