Skip to content

Commit

Permalink
test default, comment
Browse files Browse the repository at this point in the history
Signed-off-by: Sarah Funkhouser <[email protected]>
  • Loading branch information
golanglemonade committed Jan 27, 2025
1 parent eab4e8a commit d2e46b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions fgax/fga.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ func WithToken(token string) Option {
}
}

// WithIgnoreDuplicateKeyError sets whether the client should ignore duplicate key errors
func WithIgnoreDuplicateKeyError(ignore bool) Option {
return func(c *Client) {
c.IgnoreDuplicateKeyError = ignore
Expand Down
7 changes: 4 additions & 3 deletions fgax/testutils/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,10 @@ func (o *OpenFGATestFixture) NewFgaClient(ctx context.Context) (*fgax.Client, er
}

fgaConfig := fgax.Config{
StoreName: o.storeName,
HostURL: host,
ModelFile: o.modelFile,
StoreName: o.storeName,
HostURL: host,
ModelFile: o.modelFile,
IgnoreDuplicateKeyError: true,
}

c, err := fgax.CreateFGAClientWithStore(ctx, fgaConfig)
Expand Down

0 comments on commit d2e46b2

Please sign in to comment.