-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
dapeng
committed
Nov 23, 2024
1 parent
d31b84c
commit a8b7acc
Showing
11 changed files
with
138 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package postgres | ||
|
||
import ( | ||
"github.com/gone-io/gone" | ||
"github.com/gone-io/gone/goner/config" | ||
goneGorm "github.com/gone-io/gone/goner/gorm" | ||
"github.com/stretchr/testify/assert" | ||
"gorm.io/gorm" | ||
"testing" | ||
) | ||
|
||
func TestPriest(t *testing.T) { | ||
gone.RunTest(func(in struct { | ||
dial gorm.Dialector `gone:"*"` | ||
}) { | ||
assert.NotNil(t, in.dial) | ||
err := in.dial.(goneGorm.Applier).Apply(nil) | ||
assert.Nil(t, err) | ||
|
||
}, func(cemetery gone.Cemetery) error { | ||
_ = config.Priest(cemetery) | ||
return Priest(cemetery) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package mysql | ||
|
||
import ( | ||
"github.com/gone-io/gone" | ||
"github.com/gone-io/gone/goner/config" | ||
goneGorm "github.com/gone-io/gone/goner/gorm" | ||
"github.com/stretchr/testify/assert" | ||
"gorm.io/gorm" | ||
"testing" | ||
) | ||
|
||
func TestPriest(t *testing.T) { | ||
gone.RunTest(func(in struct { | ||
dial gorm.Dialector `gone:"*"` | ||
}) { | ||
assert.NotNil(t, in.dial) | ||
err := in.dial.(goneGorm.Applier).Apply(nil) | ||
assert.Nil(t, err) | ||
|
||
}, func(cemetery gone.Cemetery) error { | ||
_ = config.Priest(cemetery) | ||
return Priest(cemetery) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package postgres | ||
|
||
import ( | ||
"github.com/gone-io/gone" | ||
"github.com/gone-io/gone/goner/config" | ||
goneGorm "github.com/gone-io/gone/goner/gorm" | ||
"github.com/stretchr/testify/assert" | ||
"gorm.io/gorm" | ||
"testing" | ||
) | ||
|
||
func TestPriest(t *testing.T) { | ||
gone.RunTest(func(in struct { | ||
dial gorm.Dialector `gone:"*"` | ||
}) { | ||
assert.NotNil(t, in.dial) | ||
err := in.dial.(goneGorm.Applier).Apply(nil) | ||
assert.Nil(t, err) | ||
|
||
}, func(cemetery gone.Cemetery) error { | ||
_ = config.Priest(cemetery) | ||
return Priest(cemetery) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package mysql | ||
package sqlite | ||
|
||
import ( | ||
"github.com/gone-io/gone" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package sqlite | ||
|
||
import ( | ||
"github.com/gone-io/gone" | ||
"github.com/gone-io/gone/goner/config" | ||
goneGorm "github.com/gone-io/gone/goner/gorm" | ||
"github.com/stretchr/testify/assert" | ||
"gorm.io/gorm" | ||
"testing" | ||
) | ||
|
||
func TestPriest(t *testing.T) { | ||
gone.RunTest(func(in struct { | ||
dial gorm.Dialector `gone:"*"` | ||
}) { | ||
assert.NotNil(t, in.dial) | ||
err := in.dial.(goneGorm.Applier).Apply(nil) | ||
assert.Nil(t, err) | ||
|
||
}, func(cemetery gone.Cemetery) error { | ||
_ = config.Priest(cemetery) | ||
return Priest(cemetery) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
gorm.sqlite.dsn=./testdata/test.db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package mysql | ||
package sqlserver | ||
|
||
import ( | ||
"github.com/gone-io/gone" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package sqlserver | ||
|
||
import ( | ||
"github.com/gone-io/gone" | ||
"github.com/gone-io/gone/goner/config" | ||
goneGorm "github.com/gone-io/gone/goner/gorm" | ||
"github.com/stretchr/testify/assert" | ||
"gorm.io/gorm" | ||
"testing" | ||
) | ||
|
||
func TestPriest(t *testing.T) { | ||
gone.RunTest(func(in struct { | ||
dial gorm.Dialector `gone:"*"` | ||
}) { | ||
assert.NotNil(t, in.dial) | ||
err := in.dial.(goneGorm.Applier).Apply(nil) | ||
assert.Nil(t, err) | ||
|
||
}, func(cemetery gone.Cemetery) error { | ||
_ = config.Priest(cemetery) | ||
return Priest(cemetery) | ||
}) | ||
} |