feat: add dbtest to facility db test (#3768)

master
Kevin Wan 11 months ago committed by GitHub
parent 8fd710d5e7
commit 22c98beb24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -22,11 +22,11 @@ import (
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/stat"
"github.com/zeromicro/go-zero/core/stores/cache"
"github.com/zeromicro/go-zero/core/stores/dbtest"
"github.com/zeromicro/go-zero/core/stores/redis"
"github.com/zeromicro/go-zero/core/stores/redis/redistest"
"github.com/zeromicro/go-zero/core/stores/sqlx"
"github.com/zeromicro/go-zero/core/syncx"
"github.com/zeromicro/go-zero/internal/dbtest"
)
func init() {

@ -12,7 +12,7 @@ import (
"github.com/DATA-DOG/go-sqlmock"
"github.com/stretchr/testify/assert"
"github.com/zeromicro/go-zero/internal/dbtest"
"github.com/zeromicro/go-zero/core/stores/dbtest"
)
type mockedConn struct {

@ -8,7 +8,7 @@ import (
"github.com/DATA-DOG/go-sqlmock"
"github.com/stretchr/testify/assert"
"github.com/zeromicro/go-zero/internal/dbtest"
"github.com/zeromicro/go-zero/core/stores/dbtest"
)
func TestUnmarshalRowBool(t *testing.T) {

@ -10,8 +10,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/zeromicro/go-zero/core/breaker"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/stores/dbtest"
"github.com/zeromicro/go-zero/core/trace/tracetest"
"github.com/zeromicro/go-zero/internal/dbtest"
)
const mockedDatasource = "sqlmock"

@ -9,7 +9,7 @@ import (
"github.com/DATA-DOG/go-sqlmock"
"github.com/stretchr/testify/assert"
"github.com/zeromicro/go-zero/core/breaker"
"github.com/zeromicro/go-zero/internal/dbtest"
"github.com/zeromicro/go-zero/core/stores/dbtest"
)
const (

@ -379,3 +379,4 @@ OPTIONS:
| enum | string | sql.NullString |
| set | string | sql.NullString |
| json | string | sql.NullString |

Loading…
Cancel
Save