Skip to content

Commit

Permalink
Fixes for new relationship structs after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
josephschorr committed Oct 1, 2024
1 parent 2626edb commit 1ec152f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/datastore/test/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ func WatchWithTouchTest(t *testing.T, tester DatastoreTester) {
}

type updateWithMetadata struct {
updates []*core.RelationTupleUpdate
updates []tuple.RelationshipUpdate
metadata map[string]any
}

Expand All @@ -409,15 +409,15 @@ func WatchWithMetadataTest(t *testing.T, tester DatastoreTester) {
require.NoError(err)

_, err = ds.ReadWriteTx(ctx, func(ctx context.Context, rwt datastore.ReadWriteTransaction) error {
return rwt.WriteRelationships(ctx, []*core.RelationTupleUpdate{
return rwt.WriteRelationships(ctx, []tuple.RelationshipUpdate{
tuple.Create(tuple.MustParse("document:firstdoc#viewer@user:tom")),
})
}, options.WithMetadata(metadata))
require.NoError(err)

VerifyUpdatesWithMetadata(require, []updateWithMetadata{
{
updates: []*core.RelationTupleUpdate{tuple.Touch(tuple.Parse("document:firstdoc#viewer@user:tom"))},
updates: []tuple.RelationshipUpdate{tuple.Touch(tuple.MustParse("document:firstdoc#viewer@user:tom"))},
metadata: map[string]any{"somekey": "somevalue"},
},
},
Expand Down

0 comments on commit 1ec152f

Please sign in to comment.