From 019784cba3583cdce0c3cd4af7bbf515e11d63b4 Mon Sep 17 00:00:00 2001 From: Manuel BARRAUD Date: Wed, 11 Sep 2024 22:06:11 +0200 Subject: [PATCH] fix test unit (#155) * fix test unit * extended to all latest go version --- .github/workflows/ci.yml | 2 +- base/fetch/fetch_test.go | 8 ++++---- base/iterator/iterator_test.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c9fc40..0b77dce 100755 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ jobs: test: strategy: matrix: - go-version: [1.16.x,1.17.x,1.18.x,1.19.x,1.20.x] + go-version: [1.16.x,1.17.x,1.18.x,1.19.x,1.20.x,1.21.x,1.22.x,1.23.x] os: [ubuntu-latest] runs-on: ${{ matrix.os }} services: diff --git a/base/fetch/fetch_test.go b/base/fetch/fetch_test.go index abf6933..7f705b4 100755 --- a/base/fetch/fetch_test.go +++ b/base/fetch/fetch_test.go @@ -270,8 +270,8 @@ func TestNewCancelable(t *testing.T) { t.Error("Must not get response") return nil }, func(e error) { - if e.Error() != "The user aborted a request." { - t.Error("Error mismatch") + if e.Error() != "signal is aborted without reason" { + t.Error("Error mismatch:", e.Error()) } io <- true }) @@ -304,8 +304,8 @@ func TestNewCancelable(t *testing.T) { t.Error("Must not get response") return nil }, func(e error) { - if e.Error() != "The user aborted a request." { - t.Error("Error mismatch") + if e.Error() != "signal is aborted without reason" { + t.Error("Error mismatch:", e.Error()) } io <- true }) diff --git a/base/iterator/iterator_test.go b/base/iterator/iterator_test.go index 93953da..f40e202 100755 --- a/base/iterator/iterator_test.go +++ b/base/iterator/iterator_test.go @@ -23,7 +23,7 @@ func TestNewFromJSObject(t *testing.T) { if it, err := NewFromJSObject(obj); testingutils.AssertErr(t, err) { - testingutils.AssertExpect(t, "Object", it.ConstructName_()) + testingutils.AssertExpect(t, "Iterator", it.ConstructName_()) } }