Skip to content

Commit

Permalink
Integration test fixes for changed relationships
Browse files Browse the repository at this point in the history
  • Loading branch information
josephschorr committed Sep 30, 2024
1 parent c4ca894 commit bae7550
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions internal/services/integrationtesting/dispatch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ func TestDispatchIntegration(t *testing.T) {
Updates: []*v1.RelationshipUpdate{
{
Operation: v1.RelationshipUpdate_OPERATION_CREATE,
Relationship: tuple.MustToRelationship(tuple.MustParse("resource:foo#viewer@user:tom")),
Relationship: tuple.ToV1Relationship(tuple.MustParse("resource:foo#viewer@user:tom")),
},
{
Operation: v1.RelationshipUpdate_OPERATION_CREATE,
Relationship: tuple.MustToRelationship(tuple.MustParse("resource:foo#parent@resource:bar")),
Relationship: tuple.ToV1Relationship(tuple.MustParse("resource:foo#parent@resource:bar")),
},
{
Operation: v1.RelationshipUpdate_OPERATION_CREATE,
Relationship: tuple.MustToRelationship(tuple.MustParse("resource:bar#viewer@user:jill")),
Relationship: tuple.ToV1Relationship(tuple.MustParse("resource:bar#viewer@user:jill")),
},
},
})
Expand Down Expand Up @@ -120,7 +120,7 @@ func TestDispatchIntegration(t *testing.T) {
Updates: []*v1.RelationshipUpdate{
{
Operation: v1.RelationshipUpdate_OPERATION_CREATE,
Relationship: tuple.MustToRelationship(tuple.MustParse("resource:foo#parent@someothertype:bar")),
Relationship: tuple.ToV1Relationship(tuple.MustParse("resource:foo#parent@someothertype:bar")),
},
},
})
Expand Down Expand Up @@ -161,7 +161,7 @@ func TestDispatchIntegration(t *testing.T) {
Updates: []*v1.RelationshipUpdate{
{
Operation: v1.RelationshipUpdate_OPERATION_CREATE,
Relationship: tuple.MustToRelationship(tuple.MustParse("resource:foo#viewer@user:someuser")),
Relationship: tuple.ToV1Relationship(tuple.MustParse("resource:foo#viewer@user:someuser")),
},
},
})
Expand Down Expand Up @@ -225,7 +225,7 @@ func TestDispatchIntegration(t *testing.T) {
Updates: []*v1.RelationshipUpdate{
{
Operation: v1.RelationshipUpdate_OPERATION_CREATE,
Relationship: tuple.MustToRelationship(tuple.MustParse("resource:someresource#viewer@user:someuser")),
Relationship: tuple.ToV1Relationship(tuple.MustParse("resource:someresource#viewer@user:someuser")),
},
},
})
Expand Down Expand Up @@ -259,7 +259,7 @@ func TestDispatchIntegration(t *testing.T) {
Updates: []*v1.RelationshipUpdate{
{
Operation: v1.RelationshipUpdate_OPERATION_CREATE,
Relationship: tuple.MustToRelationship(tuple.MustParse("resource:someresource#viewer@user:sarah")),
Relationship: tuple.ToV1Relationship(tuple.MustParse("resource:someresource#viewer@user:sarah")),
},
},
})
Expand Down
2 changes: 1 addition & 1 deletion internal/services/integrationtesting/perf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func TestBurst(t *testing.T) {
client := v1.NewPermissionsServiceClient(conns[0])
var wg sync.WaitGroup
for i := 0; i < 100; i++ {
rel := tuple.MustToRelationship(tuple.Parse(tf.StandardTuples[i%(len(tf.StandardTuples))]))
rel := tuple.ToV1Relationship(tuple.MustParse(tf.StandardRelationships[i%(len(tf.StandardRelationships))]))
run := make(chan struct{})
wg.Add(1)
go func() {
Expand Down

0 comments on commit bae7550

Please sign in to comment.