Remove support for Google Spanner database. (#105846)
* Remove support for Google Spanner database.
This commit is contained in:
@@ -33,7 +33,7 @@ const (
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
testsuite.RunButSkipOnSpanner(m)
|
||||
testsuite.Run(m)
|
||||
}
|
||||
|
||||
func TestGrafanaRuleConfig(t *testing.T) {
|
||||
|
||||
@@ -54,7 +54,7 @@ import (
|
||||
var testData embed.FS
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
testsuite.RunButSkipOnSpanner(m)
|
||||
testsuite.Run(m)
|
||||
}
|
||||
|
||||
func getTestHelper(t *testing.T) *apis.K8sTestHelper {
|
||||
|
||||
@@ -39,7 +39,7 @@ import (
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
testsuite.RunButSkipOnSpanner(m)
|
||||
testsuite.Run(m)
|
||||
}
|
||||
|
||||
func getTestHelper(t *testing.T) *apis.K8sTestHelper {
|
||||
|
||||
@@ -32,7 +32,7 @@ import (
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
testsuite.RunButSkipOnSpanner(m)
|
||||
testsuite.Run(m)
|
||||
}
|
||||
|
||||
func getTestHelper(t *testing.T) *apis.K8sTestHelper {
|
||||
|
||||
@@ -44,7 +44,7 @@ import (
|
||||
var testData embed.FS
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
testsuite.RunButSkipOnSpanner(m)
|
||||
testsuite.Run(m)
|
||||
}
|
||||
|
||||
func getTestHelper(t *testing.T) *apis.K8sTestHelper {
|
||||
|
||||
@@ -18,6 +18,7 @@ import (
|
||||
"gopkg.in/ini.v1"
|
||||
|
||||
"github.com/grafana/dskit/kv"
|
||||
|
||||
"github.com/grafana/grafana/pkg/api"
|
||||
"github.com/grafana/grafana/pkg/extensions"
|
||||
"github.com/grafana/grafana/pkg/infra/db"
|
||||
@@ -508,17 +509,9 @@ func CreateGrafDir(t *testing.T, opts GrafanaOpts) (string, string) {
|
||||
require.NoError(t, err)
|
||||
_, err = dbSection.NewKey("query_retries", fmt.Sprintf("%d", queryRetries))
|
||||
require.NoError(t, err)
|
||||
if db.IsTestDBSpanner() {
|
||||
_, err = dbSection.NewKey("max_open_conn", "20")
|
||||
} else {
|
||||
_, err = dbSection.NewKey("max_open_conn", "2")
|
||||
}
|
||||
_, err = dbSection.NewKey("max_open_conn", "2")
|
||||
require.NoError(t, err)
|
||||
if db.IsTestDBSpanner() {
|
||||
_, err = dbSection.NewKey("max_idle_conn", "20")
|
||||
} else {
|
||||
_, err = dbSection.NewKey("max_idle_conn", "2")
|
||||
}
|
||||
_, err = dbSection.NewKey("max_idle_conn", "2")
|
||||
require.NoError(t, err)
|
||||
|
||||
cfgPath := filepath.Join(cfgDir, "test.ini")
|
||||
|
||||
@@ -13,8 +13,3 @@ func Run(m *testing.M) {
|
||||
db.CleanupTestDB()
|
||||
os.Exit(code)
|
||||
}
|
||||
|
||||
func RunButSkipOnSpanner(m *testing.M) {
|
||||
db.SkipTestsOnSpanner()
|
||||
Run(m)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user