mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 23:12:30 +08:00
postgres: improved tests (#84677)
* postgres: tests: better test aligning time-series results * postgres: add snapshot test for a backward-compat code
This commit is contained in:
@ -83,8 +83,8 @@ func TestIntegrationPostgresSnapshots(t *testing.T) {
|
||||
JSON: queryBytes,
|
||||
RefID: "A",
|
||||
TimeRange: backend.TimeRange{
|
||||
From: time.Date(2023, 12, 24, 14, 15, 0, 0, time.UTC),
|
||||
To: time.Date(2023, 12, 24, 14, 45, 0, 0, time.UTC),
|
||||
From: time.Date(2023, 12, 24, 14, 15, 22, 123456, time.UTC),
|
||||
To: time.Date(2023, 12, 24, 14, 45, 13, 876543, time.UTC),
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -104,6 +104,7 @@ func TestIntegrationPostgresSnapshots(t *testing.T) {
|
||||
{format: "time_series", name: "fill_null"},
|
||||
{format: "time_series", name: "fill_previous"},
|
||||
{format: "time_series", name: "fill_value"},
|
||||
{format: "time_series", name: "fill_value_wide"},
|
||||
{format: "table", name: "simple"},
|
||||
{format: "table", name: "no_rows"},
|
||||
{format: "table", name: "types_numeric"},
|
||||
@ -114,6 +115,8 @@ func TestIntegrationPostgresSnapshots(t *testing.T) {
|
||||
{format: "table", name: "timestamp_convert_integer"},
|
||||
{format: "table", name: "timestamp_convert_real"},
|
||||
{format: "table", name: "timestamp_convert_double"},
|
||||
{format: "table", name: "time_group_compat_case1"},
|
||||
{format: "table", name: "time_group_compat_case2"},
|
||||
}
|
||||
|
||||
for _, test := range tt {
|
||||
|
Reference in New Issue
Block a user