mirror of
https://github.com/grafana/grafana.git
synced 2024-11-28 19:54:10 -06:00
postgres: improve snapshot-tests for long/wide situations (#84387)
This commit is contained in:
parent
0c4e0d0f70
commit
97521ef988
@ -98,7 +98,8 @@ func TestIntegrationPostgresSnapshots(t *testing.T) {
|
||||
format string
|
||||
}{
|
||||
{format: "time_series", name: "simple"},
|
||||
{format: "time_series", name: "no_rows"},
|
||||
{format: "time_series", name: "no_rows_long"},
|
||||
{format: "time_series", name: "no_rows_wide"},
|
||||
{format: "time_series", name: "7x_compat_metric_label"},
|
||||
{format: "time_series", name: "convert_to_float64"},
|
||||
{format: "time_series", name: "convert_to_float64_not"},
|
||||
|
36
pkg/tsdb/grafana-postgresql-datasource/testdata/time_series/no_rows_wide.golden.jsonc
vendored
Normal file
36
pkg/tsdb/grafana-postgresql-datasource/testdata/time_series/no_rows_wide.golden.jsonc
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
// 🌟 This was machine generated. Do not edit. 🌟
|
||||
//
|
||||
// Frame[0] {
|
||||
// "typeVersion": [
|
||||
// 0,
|
||||
// 0
|
||||
// ],
|
||||
// "executedQueryString": "SELECT * FROM tbl WHERE false"
|
||||
// }
|
||||
// Name:
|
||||
// Dimensions: 0 Fields by 0 Rows
|
||||
// +
|
||||
// +
|
||||
//
|
||||
//
|
||||
// 🌟 This was machine generated. Do not edit. 🌟
|
||||
{
|
||||
"status": 200,
|
||||
"frames": [
|
||||
{
|
||||
"schema": {
|
||||
"meta": {
|
||||
"typeVersion": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"executedQueryString": "SELECT * FROM tbl WHERE false"
|
||||
},
|
||||
"fields": []
|
||||
},
|
||||
"data": {
|
||||
"values": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
10
pkg/tsdb/grafana-postgresql-datasource/testdata/time_series/no_rows_wide.sql
vendored
Normal file
10
pkg/tsdb/grafana-postgresql-datasource/testdata/time_series/no_rows_wide.sql
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
-- SELECT * FROM tbl WHERE false
|
||||
CREATE TEMPORARY TABLE tbl (
|
||||
"time" timestamp with time zone,
|
||||
v1 double precision,
|
||||
v2 double precision
|
||||
);
|
||||
|
||||
INSERT INTO tbl ("time", v1, v2) VALUES
|
||||
('2023-12-24 14:30:03 UTC', 10, 110),
|
||||
('2023-12-24 14:31:03 UTC', 20, 120);
|
Loading…
Reference in New Issue
Block a user