Chore: Update grafana-plugin-sdk-go to v0.142.0 (#58115)

* Chore: Update grafana-plugin-sdk-go to v0.142.0

* Update tests and golden files for 207 status code

* Chore: Move update flag definition at the top in response_parser_test.go

* retrigger

Co-authored-by: Will Browne <will.browne@grafana.com>
This commit is contained in:
Giuseppe Guerra 2022-11-03 18:34:27 +01:00 committed by GitHub
parent 857e545c5a
commit 7996a1c8ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
90 changed files with 96 additions and 5 deletions

2
go.mod
View File

@ -56,7 +56,7 @@ require (
github.com/grafana/cuetsy v0.1.1
github.com/grafana/grafana-aws-sdk v0.11.0
github.com/grafana/grafana-azure-sdk-go v1.3.1
github.com/grafana/grafana-plugin-sdk-go v0.139.0
github.com/grafana/grafana-plugin-sdk-go v0.142.0
github.com/grafana/thema v0.0.0-20220929145912-2c7c4a7bb20b
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
github.com/hashicorp/go-hclog v1.0.0

4
go.sum
View File

@ -1374,8 +1374,8 @@ github.com/grafana/grafana-azure-sdk-go v1.3.1/go.mod h1:rgrnK9m6CgKlgx4rH3FFP/6
github.com/grafana/grafana-google-sdk-go v0.0.0-20211104130251-b190293eaf58 h1:2ud7NNM7LrGPO4x0NFR8qLq68CqI4SmB7I2yRN2w9oE=
github.com/grafana/grafana-google-sdk-go v0.0.0-20211104130251-b190293eaf58/go.mod h1:Vo2TKWfDVmNTELBUM+3lkrZvFtBws0qSZdXhQxRdJrE=
github.com/grafana/grafana-plugin-sdk-go v0.114.0/go.mod h1:D7x3ah+1d4phNXpbnOaxa/osSaZlwh9/ZUnGGzegRbk=
github.com/grafana/grafana-plugin-sdk-go v0.139.0 h1:2RQKM2QpSaWTtaGN6sK+R7LO7zykOeTYF0QkAMA7JsI=
github.com/grafana/grafana-plugin-sdk-go v0.139.0/go.mod h1:Y+Ps2sesZ62AyCnX+hzrYnyDQYe/ZZl+A8yKLOBm12c=
github.com/grafana/grafana-plugin-sdk-go v0.142.0 h1:fDgA0EmWWy5+/7nX7fdHBfADR6pWuR1TZA5QL36VX7U=
github.com/grafana/grafana-plugin-sdk-go v0.142.0/go.mod h1:srvRQ+de4C5h7FqA5lSFUkFCs5pJolWT+PGV2AyBOFk=
github.com/grafana/prometheus-alertmanager v0.24.1-0.20221012142027-823cd9150293 h1:dJIdfHqu+XjKz+w9zXLqXKPdp6Jjx/UPSOwdeSfWdeQ=
github.com/grafana/prometheus-alertmanager v0.24.1-0.20221012142027-823cd9150293/go.mod h1:HVHqK+BVPa/tmL8EMhLCCrPt2a1GdJpEyxr5hgur2UI=
github.com/grafana/saml v0.4.9-0.20220727151557-61cd9c9353fc h1:1PY8n+rXuBNr3r1JQhoytWDCpc+pq+BibxV0SZv+Cr4=

View File

@ -141,7 +141,7 @@ func verifyPluginQuery(t *testing.T, ctx context.Context, c plugins.Client) {
require.NoError(t, err)
payload, err := resp.MarshalJSON()
require.NoError(t, err)
require.JSONEq(t, `{"results":{"A":{"frames":[{"schema":{"refId":"A","fields":[{"name":"time","type":"time","typeInfo":{"frame":"time.Time"}},{"name":"A-series","type":"number","typeInfo":{"frame":"int64","nullable":true}}]},"data":{"values":[[1661420570000,1661420630000,1661420690000,1661420750000,1661420810000,1661420870000],[1,20,90,30,5,0]]}}]}}}`, string(payload))
require.JSONEq(t, `{"results":{"A":{"frames":[{"schema":{"refId":"A","fields":[{"name":"time","type":"time","typeInfo":{"frame":"time.Time"}},{"name":"A-series","type":"number","typeInfo":{"frame":"int64","nullable":true}}]},"data":{"values":[[1661420570000,1661420630000,1661420690000,1661420750000,1661420810000,1661420870000],[1,20,90,30,5,0]]}}],"status":200}}}`, string(payload))
}
func verifyCorePluginCatalogue(t *testing.T, ctx context.Context, ps *store.Service) {

View File

@ -14,6 +14,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -14,6 +14,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -17,6 +17,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -149,6 +149,7 @@ func TestAPIQueryPublicDashboard(t *testing.T) {
expectedResponse := `{
"results": {
"test": {
"status": 200,
"frames": [
{
"schema": {
@ -339,6 +340,7 @@ func TestIntegrationUnauthenticatedUserCanGetPubdashPanelQueryData(t *testing.T)
`{
"results": {
"A": {
"status": 200,
"frames": [
{
"data": {

View File

@ -40,6 +40,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -40,6 +40,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -18,6 +18,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -19,6 +19,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -19,6 +19,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -18,6 +18,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -19,6 +19,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -19,6 +19,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -19,6 +19,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -19,6 +19,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -19,6 +19,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -19,6 +19,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -19,6 +19,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -19,6 +19,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -19,6 +19,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -20,6 +20,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -15,6 +15,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -17,6 +17,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -14,6 +14,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -18,6 +18,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -21,6 +21,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -15,6 +15,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -18,6 +18,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -19,6 +19,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -19,6 +19,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -19,6 +19,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -19,6 +19,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -19,6 +19,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -18,6 +18,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -19,6 +19,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -21,6 +21,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -21,6 +21,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -25,6 +25,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -19,6 +19,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -2368,6 +2368,7 @@ func TestEval(t *testing.T) {
return `{
"results": {
"A": {
"status": 200,
"frames": [
{
"schema": {
@ -2424,6 +2425,7 @@ func TestEval(t *testing.T) {
return `{
"results": {
"A": {
"status": 200,
"frames": [
{
"schema": {

View File

@ -2,6 +2,7 @@ package elasticsearch
import (
"encoding/json"
"flag"
"fmt"
"testing"
"time"
@ -13,6 +14,8 @@ import (
"github.com/stretchr/testify/require"
)
var update = flag.Bool("update", true, "update golden files")
func TestResponseParser(t *testing.T) {
t.Run("Elasticsearch response parser test", func(t *testing.T) {
t.Run("Simple query and count", func(t *testing.T) {
@ -823,7 +826,7 @@ func TestResponseParser(t *testing.T) {
queryRes := result.Responses["A"]
require.NotNil(t, queryRes)
experimental.CheckGoldenJSONResponse(t, "testdata", "trimedges_string.golden", &queryRes, false)
experimental.CheckGoldenJSONResponse(t, "testdata", "trimedges_string.golden", &queryRes, *update)
})
t.Run("No group by time", func(t *testing.T) {

View File

@ -18,6 +18,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -16,6 +16,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -29,6 +29,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -53,6 +53,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -16,6 +16,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -54,6 +54,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -43,6 +43,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -53,6 +53,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -57,6 +57,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -14,6 +14,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -23,6 +23,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -15,6 +15,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -14,6 +14,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -14,6 +14,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -17,6 +17,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -1,5 +1,6 @@
// 🌟 This was machine generated. Do not edit. 🌟
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": []
}

View File

@ -22,6 +22,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -24,6 +24,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -17,6 +17,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -19,6 +19,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -40,6 +40,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -20,6 +20,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -143,6 +143,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -22,6 +22,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -132,6 +132,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -33,6 +33,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -49,6 +49,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -28,6 +28,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -28,6 +28,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -29,6 +29,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -29,6 +29,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -22,6 +22,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -22,6 +22,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -22,6 +22,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -22,6 +22,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -22,6 +22,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -22,6 +22,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -42,6 +42,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -23,6 +23,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -23,6 +23,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -15,6 +15,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -15,6 +15,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -23,6 +23,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -133,6 +133,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -27,6 +27,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -27,6 +27,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {

View File

@ -23,6 +23,7 @@
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {