Pull request 2028: upd-golibs
Squashed commit of the following: commit cdb77df24d1f62b2cf4b26a6e65342e6362d2091 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Oct 6 16:31:11 2023 +0300 all: upd golibs
This commit is contained in:
@@ -4,7 +4,7 @@ import (
|
||||
"bytes"
|
||||
"testing"
|
||||
|
||||
"github.com/AdguardTeam/AdGuardHome/internal/aghio"
|
||||
"github.com/AdguardTeam/golibs/ioutil"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
@@ -72,11 +72,10 @@ func TestLargestLabeled(t *testing.T) {
|
||||
}
|
||||
|
||||
t.Run("scanner_fail", func(t *testing.T) {
|
||||
lr, err := aghio.LimitReader(bytes.NewReader([]byte{1, 2, 3}), 0)
|
||||
require.NoError(t, err)
|
||||
lr := ioutil.LimitReader(bytes.NewReader([]byte{1, 2, 3}), 0)
|
||||
|
||||
target := &aghio.LimitReachedError{}
|
||||
_, _, err = parsePSOutput(lr, "", nil)
|
||||
target := &ioutil.LimitError{}
|
||||
_, _, err := parsePSOutput(lr, "", nil)
|
||||
require.ErrorAs(t, err, &target)
|
||||
|
||||
assert.EqualValues(t, 0, target.Limit)
|
||||
|
||||
Reference in New Issue
Block a user