mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-05-08 08:43:01 +03:00
Pull request: use testutil
Squashed commit of the following: commit 5345a14b3565f358c56a37500cafb35b7e397951 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 21 21:13:06 2021 +0300 all: fix windows tests commit 8b9cdbe3e78f43339d21277f04e686bb154f6968 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 21 20:23:55 2021 +0300 all: imp code commit 271fdbe74c29d8ea4b53d7f56d2a36612dfed7b3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 21 19:43:32 2021 +0300 all: imp testing commit e340f9d48679c57fc8eb579b8b78d4957be111c4 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 21 18:53:51 2021 +0300 all: use testutil
This commit is contained in:
parent
7804d97743
commit
ea8950a80d
29 changed files with 211 additions and 249 deletions
internal/home
|
@ -4,6 +4,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/AdguardTeam/golibs/testutil"
|
||||
"github.com/AdguardTeam/golibs/timeutil"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
@ -333,8 +334,7 @@ func TestUpgradeSchema9to10(t *testing.T) {
|
|||
err := upgradeSchema9to10(conf)
|
||||
|
||||
if tc.wantErr != "" {
|
||||
require.Error(t, err)
|
||||
assert.Equal(t, tc.wantErr, err.Error())
|
||||
testutil.AssertErrorMsg(t, tc.wantErr, err)
|
||||
|
||||
return
|
||||
}
|
||||
|
@ -366,8 +366,7 @@ func TestUpgradeSchema9to10(t *testing.T) {
|
|||
"dns": ultimateAns,
|
||||
})
|
||||
|
||||
require.Error(t, err)
|
||||
assert.Equal(t, "unexpected type of dns: int", err.Error())
|
||||
testutil.AssertErrorMsg(t, "unexpected type of dns: int", err)
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -448,6 +447,7 @@ func TestUpgradeSchema11to12(t *testing.T) {
|
|||
|
||||
if tc.wantErr != "" {
|
||||
require.Error(t, err)
|
||||
|
||||
assert.Equal(t, tc.wantErr, err.Error())
|
||||
|
||||
return
|
||||
|
@ -482,8 +482,7 @@ func TestUpgradeSchema11to12(t *testing.T) {
|
|||
"dns": 0,
|
||||
})
|
||||
|
||||
require.Error(t, err)
|
||||
assert.Equal(t, "unexpected type of dns: int", err.Error())
|
||||
testutil.AssertErrorMsg(t, "unexpected type of dns: int", err)
|
||||
})
|
||||
|
||||
t.Run("no_field", func(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue