build(deps): Bump pgregory.net/rapid from 0.4.8 to 0.5.2 (#13096)
* build(deps): Bump pgregory.net/rapid from 0.4.8 to 0.5.2 Bumps [pgregory.net/rapid](https://github.com/flyingmutant/rapid) from 0.4.8 to 0.5.2. - [Release notes](https://github.com/flyingmutant/rapid/releases) - [Commits](https://github.com/flyingmutant/rapid/compare/v0.4.8...v0.5.2) --- updated-dependencies: - dependency-name: pgregory.net/rapid dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * fix group tests * update orm to 0.5.2 * Fix some tests * finish upgrading orm Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Amaury M <1293565+amaurym@users.noreply.github.com> Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com> Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
co-authored by
Amaury M
Aaron Craelius
Julien Robert
parent
d07b28d2bf
commit
084e129fcf
@@ -15,9 +15,9 @@ import (
|
||||
|
||||
func TestIndexKeyCodec(t *testing.T) {
|
||||
rapid.Check(t, func(t *rapid.T) {
|
||||
idxPartCdc := testutil.TestKeyCodecGen(1, 5).Draw(t, "idxPartCdc").(testutil.TestKeyCodec)
|
||||
pkCodec := testutil.TestKeyCodecGen(1, 5).Draw(t, "pkCdc").(testutil.TestKeyCodec)
|
||||
prefix := rapid.SliceOfN(rapid.Byte(), 0, 5).Draw(t, "prefix").([]byte)
|
||||
idxPartCdc := testutil.TestKeyCodecGen(1, 5).Draw(t, "idxPartCdc")
|
||||
pkCodec := testutil.TestKeyCodecGen(1, 5).Draw(t, "pkCdc")
|
||||
prefix := rapid.SliceOfN(rapid.Byte(), 0, 5).Draw(t, "prefix")
|
||||
messageType := (&testpb.ExampleTable{}).ProtoReflect().Type()
|
||||
indexKeyCdc, err := ormkv.NewIndexKeyCodec(
|
||||
prefix,
|
||||
@@ -27,7 +27,7 @@ func TestIndexKeyCodec(t *testing.T) {
|
||||
)
|
||||
assert.NilError(t, err)
|
||||
for i := 0; i < 100; i++ {
|
||||
a := testutil.GenA.Draw(t, fmt.Sprintf("a%d", i)).(*testpb.ExampleTable)
|
||||
a := testutil.GenA.Draw(t, fmt.Sprintf("a%d", i))
|
||||
key := indexKeyCdc.GetKeyValues(a.ProtoReflect())
|
||||
pk := pkCodec.Codec.GetKeyValues(a.ProtoReflect())
|
||||
idx1 := &ormkv.IndexKeyEntry{
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
|
||||
func TestKeyCodec(t *testing.T) {
|
||||
rapid.Check(t, func(t *rapid.T) {
|
||||
key := testutil.TestKeyCodecGen(0, 5).Draw(t, "key").(testutil.TestKeyCodec)
|
||||
key := testutil.TestKeyCodecGen(0, 5).Draw(t, "key")
|
||||
for i := 0; i < 100; i++ {
|
||||
keyValues := key.Draw(t, "values")
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
|
||||
func TestPrimaryKeyCodec(t *testing.T) {
|
||||
rapid.Check(t, func(t *rapid.T) {
|
||||
keyCodec := testutil.TestKeyCodecGen(0, 5).Draw(t, "keyCodec").(testutil.TestKeyCodec)
|
||||
keyCodec := testutil.TestKeyCodecGen(0, 5).Draw(t, "keyCodec")
|
||||
pkCodec, err := ormkv.NewPrimaryKeyCodec(
|
||||
keyCodec.Codec.Prefix(),
|
||||
(&testpb.ExampleTable{}).ProtoReflect().Type(),
|
||||
@@ -26,7 +26,7 @@ func TestPrimaryKeyCodec(t *testing.T) {
|
||||
)
|
||||
assert.NilError(t, err)
|
||||
for i := 0; i < 100; i++ {
|
||||
a := testutil.GenA.Draw(t, fmt.Sprintf("a%d", i)).(*testpb.ExampleTable)
|
||||
a := testutil.GenA.Draw(t, fmt.Sprintf("a%d", i))
|
||||
key := keyCodec.Codec.GetKeyValues(a.ProtoReflect())
|
||||
pk1 := &ormkv.PrimaryKeyEntry{
|
||||
TableName: aFullName,
|
||||
|
||||
@@ -14,7 +14,7 @@ import (
|
||||
|
||||
func TestSeqCodec(t *testing.T) {
|
||||
rapid.Check(t, func(t *rapid.T) {
|
||||
prefix := rapid.SliceOfN(rapid.Byte(), 0, 5).Draw(t, "prefix").([]byte)
|
||||
prefix := rapid.SliceOfN(rapid.Byte(), 0, 5).Draw(t, "prefix")
|
||||
typ := (&testpb.ExampleTable{}).ProtoReflect().Type()
|
||||
tableName := typ.Descriptor().FullName()
|
||||
cdc := ormkv.NewSeqCodec(typ, prefix)
|
||||
@@ -27,7 +27,7 @@ func TestSeqCodec(t *testing.T) {
|
||||
assert.NilError(t, err)
|
||||
assert.Equal(t, uint64(0), seq)
|
||||
|
||||
seq = rapid.Uint64().Draw(t, "seq").(uint64)
|
||||
seq = rapid.Uint64().Draw(t, "seq")
|
||||
|
||||
v := cdc.EncodeValue(seq)
|
||||
seq2, err := cdc.DecodeValue(v)
|
||||
|
||||
@@ -17,8 +17,8 @@ import (
|
||||
|
||||
func TestUniqueKeyCodec(t *testing.T) {
|
||||
rapid.Check(t, func(t *rapid.T) {
|
||||
keyCodec := testutil.TestKeyCodecGen(1, 5).Draw(t, "keyCodec").(testutil.TestKeyCodec)
|
||||
pkCodec := testutil.TestKeyCodecGen(1, 5).Draw(t, "primaryKeyCodec").(testutil.TestKeyCodec)
|
||||
keyCodec := testutil.TestKeyCodecGen(1, 5).Draw(t, "keyCodec")
|
||||
pkCodec := testutil.TestKeyCodecGen(1, 5).Draw(t, "primaryKeyCodec")
|
||||
|
||||
// check if we have a trivial unique index where all of the fields
|
||||
// in the primary key are in the unique key, we should expect an
|
||||
@@ -51,7 +51,7 @@ func TestUniqueKeyCodec(t *testing.T) {
|
||||
}
|
||||
|
||||
for i := 0; i < 100; i++ {
|
||||
a := testutil.GenA.Draw(t, fmt.Sprintf("a%d", i)).(*testpb.ExampleTable)
|
||||
a := testutil.GenA.Draw(t, fmt.Sprintf("a%d", i))
|
||||
key := keyCodec.Codec.GetKeyValues(a.ProtoReflect())
|
||||
pk := pkCodec.Codec.GetKeyValues(a.ProtoReflect())
|
||||
uniq1 := &ormkv.IndexKeyEntry{
|
||||
|
||||
Reference in New Issue
Block a user