Skip to content

Commit

Permalink
wip: fix error string
Browse files Browse the repository at this point in the history
  • Loading branch information
jzelinskie committed Jul 14, 2023
1 parent f9b8478 commit 23621f2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/datastore/test/tuples.go
Expand Up @@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"strconv"
"strings"
"sync"
"testing"
"time"
Expand Down Expand Up @@ -638,7 +639,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)
}

Expand Down

0 comments on commit 23621f2

Please sign in to comment.