mirror of
https://github.com/mainnika/mongox-go-driver.git
synced 2026-05-22 15:53:36 +00:00
Ephemeral database for testing in the testing package
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
|
||||
"github.com/mainnika/mongox-go-driver/v2/mongox/tempdb"
|
||||
"github.com/mainnika/mongox-go-driver/v2/mongox-testing/database"
|
||||
)
|
||||
|
||||
func Test_GetID(t *testing.T) {
|
||||
@@ -41,7 +41,7 @@ func Test_SaveLoad(t *testing.T) {
|
||||
Primary `bson:",inline" json:",inline" collection:"1"`
|
||||
}
|
||||
|
||||
db, err := tempdb.NewTempDB("mongodb://localhost")
|
||||
db, err := database.NewEphemeral("mongodb://localhost")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
|
||||
"github.com/mainnika/mongox-go-driver/v2/mongox/tempdb"
|
||||
"github.com/mainnika/mongox-go-driver/v2/mongox-testing/database"
|
||||
)
|
||||
|
||||
func Test_GetID(t *testing.T) {
|
||||
@@ -41,7 +41,7 @@ func Test_SaveLoad(t *testing.T) {
|
||||
Primary `bson:",inline" json:",inline" collection:"1"`
|
||||
}
|
||||
|
||||
db, err := tempdb.NewTempDB("mongodb://localhost")
|
||||
db, err := database.NewEphemeral("mongodb://localhost")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/mainnika/mongox-go-driver/v2/mongox/tempdb"
|
||||
"github.com/mainnika/mongox-go-driver/v2/mongox-testing/database"
|
||||
)
|
||||
|
||||
func Test_GetID(t *testing.T) {
|
||||
@@ -40,7 +40,7 @@ func Test_SaveLoad(t *testing.T) {
|
||||
Primary `bson:",inline" json:",inline" collection:"1"`
|
||||
}
|
||||
|
||||
db, err := tempdb.NewTempDB("mongodb://localhost")
|
||||
db, err := database.NewEphemeral("mongodb://localhost")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user