File tree Expand file tree Collapse file tree 4 files changed +9
-11
lines changed Expand file tree Collapse file tree 4 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -3,20 +3,18 @@ package gormlite
3
3
import (
4
4
"testing"
5
5
6
+ "github.com/ncruces/go-sqlite3/vfs/memdb"
6
7
"gorm.io/gorm"
7
8
"gorm.io/gorm/logger"
8
9
)
9
10
10
11
func TestErrorTranslator (t * testing.T ) {
11
- // This is the DSN of the in-memory SQLite database for these tests.
12
- const InMemoryDSN = "file:testdatabase?mode=memory&cache=shared"
13
-
14
12
// This is the example object for testing the unique constraint error
15
13
type Article struct {
16
14
ArticleNumber string `gorm:"unique"`
17
15
}
18
16
19
- db , err := gorm .Open (Open (InMemoryDSN ), & gorm.Config {
17
+ db , err := gorm .Open (Open (memdb . TestDB ( t ) ), & gorm.Config {
20
18
Logger : logger .Default .LogMode (logger .Silent ),
21
19
TranslateError : true })
22
20
Original file line number Diff line number Diff line change 5
5
toolchain go1.23.0
6
6
7
7
require (
8
- github.com/ncruces/go-sqlite3 v0.18.1
9
- gorm.io/gorm v1.25.11
8
+ github.com/ncruces/go-sqlite3 v0.18.3
9
+ gorm.io/gorm v1.25.12
10
10
)
11
11
12
12
require (
Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD
2
2
github.com/jinzhu/inflection v1.0.0 /go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc =
3
3
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ =
4
4
github.com/jinzhu/now v1.1.5 /go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8 =
5
- github.com/ncruces/go-sqlite3 v0.18.1 h1:iN8IMZV5EMxpH88NUac9vId23eTKNFUhP7jgY0EBbNc =
6
- github.com/ncruces/go-sqlite3 v0.18.1 /go.mod h1:eEOyZnW1dGTJ+zDpMuzfYamEUBtdFz5zeYhqLBtHxvM =
5
+ github.com/ncruces/go-sqlite3 v0.18.3 h1:tyMa75uh7LcINcfo0WrzOvcTkfz8Hqu0TEPX+KVyes4 =
6
+ github.com/ncruces/go-sqlite3 v0.18.3 /go.mod h1:HAwOtA+cyEX3iN6YmkpQwfT4vMMgCB7rQRFUdOgEFik =
7
7
github.com/ncruces/julianday v1.0.0 h1:fH0OKwa7NWvniGQtxdJRxAgkBMolni2BjDHaWTxqt7M =
8
8
github.com/ncruces/julianday v1.0.0 /go.mod h1:Dusn2KvZrrovOMJuOt0TNXL6tB7U2E8kvza5fFc9G7g =
9
9
github.com/tetratelabs/wazero v1.8.0 h1:iEKu0d4c2Pd+QSRieYbnQC9yiFlMS9D+Jr0LsRmcF4g =
@@ -12,5 +12,5 @@ golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
12
12
golang.org/x/sys v0.25.0 /go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA =
13
13
golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224 =
14
14
golang.org/x/text v0.18.0 /go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY =
15
- gorm.io/gorm v1.25.11 h1:/Wfyg1B/je1hnDx3sMkX+gAlxrlZpn6X0BXRlwXlvHg =
16
- gorm.io/gorm v1.25.11 /go.mod h1:xh7N7RHfYlNc5EmcI/El95gXusucDrQnHXe0+CgWcLQ =
15
+ gorm.io/gorm v1.25.12 h1:I0u8i2hWQItBq1WfE0o2+WuL9+8L21K9e2HHSTE/0f8 =
16
+ gorm.io/gorm v1.25.12 /go.mod h1:xh7N7RHfYlNc5EmcI/El95gXusucDrQnHXe0+CgWcLQ =
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ rm -rf gorm/ tests/
7
7
go work use -r .
8
8
go test
9
9
10
- git clone --branch v1.25.11 --filter=blob:none https://github.com/go-gorm/gorm.git
10
+ git clone --branch v1.25.12 --filter=blob:none https://github.com/go-gorm/gorm.git
11
11
mv gorm/tests tests
12
12
rm -rf gorm/
13
13
You can’t perform that action at this time.
0 commit comments