Skip to content

Commit

Permalink
Fix benchmark tests for changes to test runner
Browse files Browse the repository at this point in the history
  • Loading branch information
josephschorr committed May 3, 2023
1 parent 5ff4546 commit 37a17dd
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions internal/services/integrationtesting/benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ func BenchmarkServices(b *testing.B) {
"basic lookup of view for a user",
"testconfigs/basicrbac.yaml",
func(ctx context.Context, b *testing.B, tester consistencytestutil.ServiceTester, revision datastore.Revision) error {
results, err := tester.LookupResources(ctx, &core.RelationReference{
results, _, err := tester.LookupResources(ctx, &core.RelationReference{
Namespace: "example/document",
Relation: "view",
}, &core.ObjectAndRelation{
Namespace: "example/user",
ObjectId: "tom",
Relation: tuple.Ellipsis,
}, revision)
}, revision, nil, 0)
require.GreaterOrEqual(b, len(results), 0)
return err
},
Expand All @@ -53,14 +53,14 @@ func BenchmarkServices(b *testing.B) {
"recursively through groups",
"testconfigs/simplerecursive.yaml",
func(ctx context.Context, b *testing.B, tester consistencytestutil.ServiceTester, revision datastore.Revision) error {
results, err := tester.LookupResources(ctx, &core.RelationReference{
results, _, err := tester.LookupResources(ctx, &core.RelationReference{
Namespace: "srrr/resource",
Relation: "viewer",
}, &core.ObjectAndRelation{
Namespace: "srrr/user",
ObjectId: "someguy",
Relation: tuple.Ellipsis,
}, revision)
}, revision, nil, 0)
require.GreaterOrEqual(b, len(results), 0)
return err
},
Expand All @@ -69,14 +69,14 @@ func BenchmarkServices(b *testing.B) {
"recursively through wide groups",
"benchconfigs/widegroups.yaml",
func(ctx context.Context, b *testing.B, tester consistencytestutil.ServiceTester, revision datastore.Revision) error {
results, err := tester.LookupResources(ctx, &core.RelationReference{
results, _, err := tester.LookupResources(ctx, &core.RelationReference{
Namespace: "resource",
Relation: "view",
}, &core.ObjectAndRelation{
Namespace: "user",
ObjectId: "tom",
Relation: tuple.Ellipsis,
}, revision)
}, revision, nil, 0)
require.GreaterOrEqual(b, len(results), 0)
return err
},
Expand All @@ -85,14 +85,14 @@ func BenchmarkServices(b *testing.B) {
"lookup with intersection",
"benchconfigs/lookupintersection.yaml",
func(ctx context.Context, b *testing.B, tester consistencytestutil.ServiceTester, revision datastore.Revision) error {
results, err := tester.LookupResources(ctx, &core.RelationReference{
results, _, err := tester.LookupResources(ctx, &core.RelationReference{
Namespace: "resource",
Relation: "view",
}, &core.ObjectAndRelation{
Namespace: "user",
ObjectId: "tom",
Relation: tuple.Ellipsis,
}, revision)
}, revision, nil, 0)
require.Equal(b, len(results), 499)
return err
},
Expand Down

0 comments on commit 37a17dd

Please sign in to comment.