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:
Gábor Farkas
2024-03-26 10:22:58 +01:00
committed by GitHub
parent 28ecd83987
commit c835022861
7 changed files with 267 additions and 2 deletions

View File

@ -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 {