Spanner support enhancements (#101634)
* Adds ability to run integration tests against spanner (by using GRAFANA_TEST_DB=spanner env variable. SPANNER_DB variable then specifies database to use: spannertest, emulator or string like /projects/<project>/instances/<instance>/databases/<db>) * Adds feature to migration dialects to create database from a snapshot, instead of running individual migrations. * Adds first version of Spanner snapshot, prepared from "OSS" migrations. * Uses generated bit-reversed-positive values instead of auto_increment. (As an experiment)
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"gopkg.in/ini.v1"
|
||||
|
||||
"xorm.io/xorm"
|
||||
|
||||
. "github.com/grafana/grafana/pkg/services/sqlstore/migrator"
|
||||
@@ -76,7 +77,8 @@ func TestIntegrationMigrationLock(t *testing.T) {
|
||||
}
|
||||
|
||||
dbType := sqlutil.GetTestDBType()
|
||||
if dbType == SQLite {
|
||||
// skip for SQLite and Spanner since there is no database locking (only migrator locking)
|
||||
if dbType == SQLite || dbType == Spanner {
|
||||
t.Skip()
|
||||
}
|
||||
|
||||
@@ -233,8 +235,8 @@ func TestMigratorLocking(t *testing.T) {
|
||||
func TestDatabaseLocking(t *testing.T) {
|
||||
dbType := sqlutil.GetTestDBType()
|
||||
|
||||
// skip for SQLite since there is no database locking (only migrator locking)
|
||||
if dbType == SQLite {
|
||||
// skip for SQLite and Spanner since there is no database locking (only migrator locking)
|
||||
if dbType == SQLite || dbType == Spanner {
|
||||
t.Skip()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user