Annotations: Fix EpochEnd being zero for Alert-generated annotations (#60931)

* Revert linter suggestion

* Re-add nolint

* Work in terms of pointer rather than copy

* Add tests covering validation

* Add comment
This commit is contained in:
Alexander Weaver
2023-01-04 10:16:54 -06:00
committed by GitHub
parent 0aeee7f265
commit 1381fb6dfc
2 changed files with 12 additions and 4 deletions
@@ -185,6 +185,11 @@ func TestIntegrationAnnotations(t *testing.T) {
inserted, err := repo.Get(context.Background(), query)
require.NoError(t, err)
assert.Len(t, inserted, count)
for _, ins := range inserted {
require.Equal(t, int64(12), ins.Time)
require.Equal(t, int64(12), ins.TimeEnd)
require.Equal(t, ins.Created, ins.Updated)
}
})
t.Run("Can batch-insert annotations with tags", func(t *testing.T) {