mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
[Chore] Remove health check that is not used (#61283)
This commit is contained in:
parent
19ca93d5ce
commit
6c6a970f56
@ -1,3 +0,0 @@
|
||||
package models
|
||||
|
||||
type GetDBHealthQuery struct{}
|
@ -1,16 +0,0 @@
|
||||
package sqlstore
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
)
|
||||
|
||||
// GetDBHealthQuery executes a query to check
|
||||
// the availability of the database.
|
||||
func (ss *SQLStore) GetDBHealthQuery(ctx context.Context, query *models.GetDBHealthQuery) error {
|
||||
return ss.WithDbSession(ctx, func(session *DBSession) error {
|
||||
_, err := session.Exec("SELECT 1")
|
||||
return err
|
||||
})
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
package sqlstore
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
)
|
||||
|
||||
func TestIntegrationGetDBHealthQuery(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping integration test")
|
||||
}
|
||||
store := InitTestDB(t)
|
||||
|
||||
query := models.GetDBHealthQuery{}
|
||||
err := store.GetDBHealthQuery(context.Background(), &query)
|
||||
require.NoError(t, err)
|
||||
}
|
@ -116,10 +116,6 @@ func (m *SQLStoreMock) Quote(value string) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *SQLStoreMock) GetDBHealthQuery(ctx context.Context, query *models.GetDBHealthQuery) error {
|
||||
return m.ExpectedError
|
||||
}
|
||||
|
||||
func (m *SQLStoreMock) GetSqlxSession() *session.SessionDB {
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user