mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* Chore: Run integration tests without grabpl * Add new step for integration tests in lib.star * Remove old integration test step from lib.star * Change drone signature * Fix: Edit starlark integration step to not affect enterprise * Remove all build tags & rename starlark integration test step * Resync .drone.yml with .drone.star * Fix lint errors * Fix lint errors * Fix lint errors * Fix more lint errors * Fix another lint error * Rename integration test step * Fix last lint error * Recomment enterprise step * Remove comment from Makefile Co-authored-by: Ida Furjesova <ida.furjesova@grafana.com>
24 lines
656 B
Go
24 lines
656 B
Go
package queryhistory
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/grafana/grafana/pkg/components/simplejson"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestIntegrationCreateQueryInQueryHistory(t *testing.T) {
|
|
testScenario(t, "When users tries to create query in query history it should succeed",
|
|
func(t *testing.T, sc scenarioContext) {
|
|
command := CreateQueryInQueryHistoryCommand{
|
|
DatasourceUID: "NCzh67i",
|
|
Queries: simplejson.NewFromAny(map[string]interface{}{
|
|
"expr": "test",
|
|
}),
|
|
}
|
|
sc.reqContext.Req.Body = mockRequestBody(command)
|
|
resp := sc.service.createHandler(sc.reqContext)
|
|
require.Equal(t, 200, resp.Status())
|
|
})
|
|
}
|