mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: add tests for migrator
This commit is contained in:
17
test/store/migrator_test.go
Normal file
17
test/store/migrator_test.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package teststore
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestGetCurrentSchemaVersion(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
ts := NewTestingStore(ctx, t)
|
||||
|
||||
currentSchemaVersion, err := ts.GetCurrentSchemaVersion()
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, "0.22.4", currentSchemaVersion)
|
||||
}
|
@@ -32,7 +32,7 @@ func GetTestingProfile(t *testing.T) *profile.Profile {
|
||||
|
||||
// Get a temporary directory for the test data.
|
||||
dir := t.TempDir()
|
||||
mode := "dev"
|
||||
mode := "prod"
|
||||
port := getUnusedPort()
|
||||
driver := getDriverFromEnv()
|
||||
dsn := os.Getenv("DSN")
|
||||
|
Reference in New Issue
Block a user