mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Update grafana-plugin-sdk-go to v0.136.0 (#50127)
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
"context"
|
||||
"mime/multipart"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
@@ -45,8 +44,7 @@ func TestListFiles(t *testing.T) {
|
||||
frame, err := store.List(context.Background(), dummyUser, "public/testdata")
|
||||
require.NoError(t, err)
|
||||
|
||||
err = experimental.CheckGoldenFrame(path.Join("testdata", "public_testdata.golden.txt"), frame, true)
|
||||
require.NoError(t, err)
|
||||
experimental.CheckGoldenJSONFrame(t, "testdata", "public_testdata.golden", frame, true)
|
||||
|
||||
file, err := store.Read(context.Background(), dummyUser, "public/testdata/js_libraries.csv")
|
||||
require.NoError(t, err)
|
||||
@@ -54,8 +52,7 @@ func TestListFiles(t *testing.T) {
|
||||
|
||||
frame, err = testdatasource.LoadCsvContent(bytes.NewReader(file.Contents), file.Name)
|
||||
require.NoError(t, err)
|
||||
err = experimental.CheckGoldenFrame(path.Join("testdata", "public_testdata_js_libraries.golden.txt"), frame, true)
|
||||
require.NoError(t, err)
|
||||
experimental.CheckGoldenJSONFrame(t, "testdata", "public_testdata_js_libraries.golden", frame, true)
|
||||
}
|
||||
|
||||
func TestUpload(t *testing.T) {
|
||||
|
||||
97
pkg/services/store/testdata/public_testdata.golden.jsonc
vendored
Normal file
97
pkg/services/store/testdata/public_testdata.golden.jsonc
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
// 🌟 This was machine generated. Do not edit. 🌟
|
||||
//
|
||||
// Frame[0] {
|
||||
// "type": "directory-listing",
|
||||
// "custom": {
|
||||
// "HasMore": false
|
||||
// }
|
||||
// }
|
||||
// Name:
|
||||
// Dimensions: 3 Fields by 7 Rows
|
||||
// +--------------------------+-------------------------+---------------+
|
||||
// | Name: name | Name: mediaType | Name: size |
|
||||
// | Labels: | Labels: | Labels: |
|
||||
// | Type: []string | Type: []string | Type: []int64 |
|
||||
// +--------------------------+-------------------------+---------------+
|
||||
// | browser_marketshare.csv | text/csv; charset=utf-8 | 355 |
|
||||
// | flight_info_by_state.csv | text/csv; charset=utf-8 | 681 |
|
||||
// | gdp_per_capita.csv | text/csv; charset=utf-8 | 4116 |
|
||||
// | js_libraries.csv | text/csv; charset=utf-8 | 179 |
|
||||
// | ohlc_dogecoin.csv | text/csv; charset=utf-8 | 191804 |
|
||||
// | population_by_state.csv | text/csv; charset=utf-8 | 138 |
|
||||
// | weight_height.csv | text/csv; charset=utf-8 | 418121 |
|
||||
// +--------------------------+-------------------------+---------------+
|
||||
//
|
||||
//
|
||||
// 🌟 This was machine generated. Do not edit. 🌟
|
||||
{
|
||||
"frames": [
|
||||
{
|
||||
"schema": {
|
||||
"meta": {
|
||||
"type": "directory-listing",
|
||||
"custom": {
|
||||
"HasMore": false
|
||||
}
|
||||
},
|
||||
"fields": [
|
||||
{
|
||||
"name": "name",
|
||||
"type": "string",
|
||||
"typeInfo": {
|
||||
"frame": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "mediaType",
|
||||
"type": "string",
|
||||
"typeInfo": {
|
||||
"frame": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "size",
|
||||
"type": "number",
|
||||
"typeInfo": {
|
||||
"frame": "int64"
|
||||
},
|
||||
"config": {
|
||||
"unit": "bytes"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"data": {
|
||||
"values": [
|
||||
[
|
||||
"browser_marketshare.csv",
|
||||
"flight_info_by_state.csv",
|
||||
"gdp_per_capita.csv",
|
||||
"js_libraries.csv",
|
||||
"ohlc_dogecoin.csv",
|
||||
"population_by_state.csv",
|
||||
"weight_height.csv"
|
||||
],
|
||||
[
|
||||
"text/csv; charset=utf-8",
|
||||
"text/csv; charset=utf-8",
|
||||
"text/csv; charset=utf-8",
|
||||
"text/csv; charset=utf-8",
|
||||
"text/csv; charset=utf-8",
|
||||
"text/csv; charset=utf-8",
|
||||
"text/csv; charset=utf-8"
|
||||
],
|
||||
[
|
||||
355,
|
||||
681,
|
||||
4116,
|
||||
179,
|
||||
191804,
|
||||
138,
|
||||
418121
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
🌟 This was machine generated. Do not edit. 🌟
|
||||
|
||||
Frame[0] {
|
||||
"type": "directory-listing",
|
||||
"custom": {
|
||||
"HasMore": false
|
||||
}
|
||||
}
|
||||
Name:
|
||||
Dimensions: 3 Fields by 7 Rows
|
||||
+--------------------------+-------------------------+---------------+
|
||||
| Name: name | Name: mediaType | Name: size |
|
||||
| Labels: | Labels: | Labels: |
|
||||
| Type: []string | Type: []string | Type: []int64 |
|
||||
+--------------------------+-------------------------+---------------+
|
||||
| browser_marketshare.csv | text/csv; charset=utf-8 | 355 |
|
||||
| flight_info_by_state.csv | text/csv; charset=utf-8 | 681 |
|
||||
| gdp_per_capita.csv | text/csv; charset=utf-8 | 4116 |
|
||||
| js_libraries.csv | text/csv; charset=utf-8 | 179 |
|
||||
| ohlc_dogecoin.csv | text/csv; charset=utf-8 | 191804 |
|
||||
| population_by_state.csv | text/csv; charset=utf-8 | 138 |
|
||||
| weight_height.csv | text/csv; charset=utf-8 | 418121 |
|
||||
+--------------------------+-------------------------+---------------+
|
||||
|
||||
|
||||
====== TEST DATA RESPONSE (arrow base64) ======
|
||||
FRAME=QVJST1cxAAD/////WAIAABAAAAAAAAoADgAMAAsABAAKAAAAFAAAAAAAAAEEAAoADAAAAAgABAAKAAAACAAAAKgAAAADAAAATAAAACgAAAAEAAAAMP7//wgAAAAMAAAAAAAAAAAAAAAFAAAAcmVmSWQAAABQ/v//CAAAAAwAAAAAAAAAAAAAAAQAAABuYW1lAAAAAHD+//8IAAAAQAAAADcAAAB7InR5cGUiOiJkaXJlY3RvcnktbGlzdGluZyIsImN1c3RvbSI6eyJIYXNNb3JlIjpmYWxzZX19AAQAA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lwZQASABgAFAAAABMADAAAAAgABAASAAAAFAAAAEQAAABIAAAAAAAABUQAAAABAAAADAAAAAgADAAIAAQACAAAAAgAAAAQAAAABAAAAG5hbWUAAAAABAAAAG5hbWUAAAAAAAAAAAQABAAEAAAABAAAAG5hbWUAAAAAiAIAAEFSUk9XMQ==
|
||||
99
pkg/services/store/testdata/public_testdata_js_libraries.golden.jsonc
vendored
Normal file
99
pkg/services/store/testdata/public_testdata_js_libraries.golden.jsonc
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
// 🌟 This was machine generated. Do not edit. 🌟
|
||||
//
|
||||
// Frame[0]
|
||||
// Name: js_libraries.csv
|
||||
// Dimensions: 4 Fields by 6 Rows
|
||||
// +-----------------+--------------------+----------------+----------------+
|
||||
// | Name: Library | Name: Github Stars | Name: Forks | Name: Watchers |
|
||||
// | Labels: | Labels: | Labels: | Labels: |
|
||||
// | Type: []*string | Type: []*int64 | Type: []*int64 | Type: []*int64 |
|
||||
// +-----------------+--------------------+----------------+----------------+
|
||||
// | React.js | 169000 | 34000 | 6700 |
|
||||
// | Vue | 184000 | 29100 | 6300 |
|
||||
// | Angular | 73400 | 19300 | 3200 |
|
||||
// | JQuery | 54900 | 20000 | 3300 |
|
||||
// | Meteor | 42400 | 5200 | 1700 |
|
||||
// | Aurelia | 11600 | 684 | 442 |
|
||||
// +-----------------+--------------------+----------------+----------------+
|
||||
//
|
||||
//
|
||||
// 🌟 This was machine generated. Do not edit. 🌟
|
||||
{
|
||||
"frames": [
|
||||
{
|
||||
"schema": {
|
||||
"name": "js_libraries.csv",
|
||||
"fields": [
|
||||
{
|
||||
"name": "Library",
|
||||
"type": "string",
|
||||
"typeInfo": {
|
||||
"frame": "string",
|
||||
"nullable": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Github Stars",
|
||||
"type": "number",
|
||||
"typeInfo": {
|
||||
"frame": "int64",
|
||||
"nullable": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Forks",
|
||||
"type": "number",
|
||||
"typeInfo": {
|
||||
"frame": "int64",
|
||||
"nullable": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Watchers",
|
||||
"type": "number",
|
||||
"typeInfo": {
|
||||
"frame": "int64",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"data": {
|
||||
"values": [
|
||||
[
|
||||
"React.js",
|
||||
"Vue",
|
||||
"Angular",
|
||||
"JQuery",
|
||||
"Meteor",
|
||||
"Aurelia"
|
||||
],
|
||||
[
|
||||
169000,
|
||||
184000,
|
||||
73400,
|
||||
54900,
|
||||
42400,
|
||||
11600
|
||||
],
|
||||
[
|
||||
34000,
|
||||
29100,
|
||||
19300,
|
||||
20000,
|
||||
5200,
|
||||
684
|
||||
],
|
||||
[
|
||||
6700,
|
||||
6300,
|
||||
3200,
|
||||
3300,
|
||||
1700,
|
||||
442
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
🌟 This was machine generated. Do not edit. 🌟
|
||||
|
||||
Frame[0]
|
||||
Name: js_libraries.csv
|
||||
Dimensions: 4 Fields by 6 Rows
|
||||
+-----------------+--------------------+----------------+----------------+
|
||||
| Name: Library | Name: Github Stars | Name: Forks | Name: Watchers |
|
||||
| Labels: | Labels: | Labels: | Labels: |
|
||||
| Type: []*string | Type: []*int64 | Type: []*int64 | Type: []*int64 |
|
||||
+-----------------+--------------------+----------------+----------------+
|
||||
| React.js | 169000 | 34000 | 6700 |
|
||||
| Vue | 184000 | 29100 | 6300 |
|
||||
| Angular | 73400 | 19300 | 3200 |
|
||||
| JQuery | 54900 | 20000 | 3300 |
|
||||
| Meteor | 42400 | 5200 | 1700 |
|
||||
| Aurelia | 11600 | 684 | 442 |
|
||||
+-----------------+--------------------+----------------+----------------+
|
||||
|
||||
|
||||
====== TEST DATA RESPONSE (arrow base64) ======
|
||||
FRAME=QVJST1cxAAD/////WAIAABAAAAAAAAoADgAMA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