mirror of
https://github.com/grafana/grafana.git
synced 2025-02-11 08:05:43 -06:00
18 lines
362 B
Go
18 lines
362 B
Go
|
package xorm
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
_ "github.com/mattn/go-sqlite3"
|
||
|
"github.com/stretchr/testify/require"
|
||
|
)
|
||
|
|
||
|
func TestNewEngine(t *testing.T) {
|
||
|
t.Run("successfully create a new engine", func(t *testing.T) {
|
||
|
eng, err := NewEngine("sqlite3", "./test.db")
|
||
|
require.NoError(t, err)
|
||
|
require.NotNil(t, eng)
|
||
|
require.Equal(t, "sqlite3", eng.DriverName())
|
||
|
})
|
||
|
}
|