mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 23:52:19 +08:00

* Add support for ASC ordering and introduce ResourceVersionMatch_Unset as default Add SortAscending to continue token and add integration test for pagination. * Change protobuf order * Make backwards compatible * Update pkg/storage/unified/sql/backend.go Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com> --------- Co-authored-by: Marco de Abreu <18629099+marcoabreu@users.noreply.github.com> Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
17 lines
296 B
Go
17 lines
296 B
Go
package resource
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestContinueToken(t *testing.T) {
|
|
token := &ContinueToken{
|
|
ResourceVersion: 100,
|
|
StartOffset: 50,
|
|
SortAscending: false,
|
|
}
|
|
assert.Equal(t, "eyJvIjo1MCwidiI6MTAwLCJzIjpmYWxzZX0=", token.String())
|
|
}
|