Skip to content

Commit

Permalink
wip: fix error string
Browse files Browse the repository at this point in the history
  • Loading branch information
jzelinskie authored and vroldanbet committed Mar 20, 2024
1 parent a67aa2b commit d9cbea4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/datastore/test/tuples.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"strconv"
"strings"
"sync"
"testing"
"time"
Expand Down Expand Up @@ -600,7 +601,10 @@ func CreateAlreadyExistingTest(t *testing.T, tester DatastoreTester) {

_, err = common.WriteTuples(ctx, ds, core.RelationTupleUpdate_CREATE, tpl1)
require.ErrorAs(err, &common.CreateRelationshipExistsError{})
require.Contains(err.Error(), "could not CREATE relationship ")
require.Condition(func() bool {
return strings.Contains(err.Error(), "could not CREATE relationship") || // mysql5
strings.Contains(err.Error(), "could not CREATE one or more relationships") // mysql8
})
grpcutil.RequireStatus(t, codes.AlreadyExists, err)

f := func(ctx context.Context, rwt datastore.ReadWriteTransaction) error {
Expand Down

0 comments on commit d9cbea4

Please sign in to comment.