From d9cbea4b4dee56f37e9be1da320208a137491242 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Fri, 14 Jul 2023 12:11:38 -0700 Subject: [PATCH] wip: fix error string --- pkg/datastore/test/tuples.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/datastore/test/tuples.go b/pkg/datastore/test/tuples.go index 194207dce4..a246dfcdde 100644 --- a/pkg/datastore/test/tuples.go +++ b/pkg/datastore/test/tuples.go @@ -5,6 +5,7 @@ import ( "errors" "fmt" "strconv" + "strings" "sync" "testing" "time" @@ -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 {