mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 02:42:22 +08:00
Remove support for Google Spanner database. (#105846)
* Remove support for Google Spanner database.
This commit is contained in:
@ -373,11 +373,6 @@ func (ss *SQLStore) RecursiveQueriesAreSupported() (bool, error) {
|
||||
return *ss.recursiveQueriesAreSupported, nil
|
||||
}
|
||||
recursiveQueriesAreSupported := func() (bool, error) {
|
||||
if ss.GetDBType() == migrator.Spanner {
|
||||
// no need to try...
|
||||
return false, nil
|
||||
}
|
||||
|
||||
var result []int
|
||||
if err := ss.WithDbSession(context.Background(), func(sess *DBSession) error {
|
||||
recQry := `WITH RECURSIVE cte (n) AS
|
||||
@ -414,7 +409,6 @@ var testSQLStoreSetup = false
|
||||
var testSQLStore *SQLStore
|
||||
var testSQLStoreMutex sync.Mutex
|
||||
var testSQLStoreCleanup []func()
|
||||
var testSQLStoreSkipTestsOnBackend string // When not empty and matches DB type, test is skipped.
|
||||
|
||||
// InitTestDBOpt contains options for InitTestDB.
|
||||
type InitTestDBOpt struct {
|
||||
@ -459,12 +453,6 @@ func SetupTestDB() {
|
||||
testSQLStoreSetup = true
|
||||
}
|
||||
|
||||
func SkipTestsOnSpanner() {
|
||||
testSQLStoreMutex.Lock()
|
||||
defer testSQLStoreMutex.Unlock()
|
||||
testSQLStoreSkipTestsOnBackend = "spanner"
|
||||
}
|
||||
|
||||
func CleanupTestDB() {
|
||||
testSQLStoreMutex.Lock()
|
||||
defer testSQLStoreMutex.Unlock()
|
||||
@ -549,10 +537,6 @@ func TestMain(m *testing.M) {
|
||||
if testSQLStore == nil {
|
||||
dbType := sqlutil.GetTestDBType()
|
||||
|
||||
if testSQLStoreSkipTestsOnBackend != "" && testSQLStoreSkipTestsOnBackend == dbType {
|
||||
t.Skipf("test skipped when using DB type %s", testSQLStoreSkipTestsOnBackend)
|
||||
}
|
||||
|
||||
// set test db config
|
||||
cfg := setting.NewCfg()
|
||||
// nolint:staticcheck
|
||||
|
Reference in New Issue
Block a user