Skip to content

Commit

Permalink
e2e: fix TestS3Basic
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed May 28, 2024
1 parent 60a8586 commit 984f9e5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion stores/sql/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ import (
)

func Bucket(ctx context.Context, tx sql.Tx, bucket string) (api.Bucket, error) {
return scanBucket(tx.QueryRow(ctx, "SELECT created_at, name, COALESCE(policy, '{}') FROM buckets WHERE name = ?", bucket))
b, err := scanBucket(tx.QueryRow(ctx, "SELECT created_at, name, COALESCE(policy, '{}') FROM buckets WHERE name = ?", bucket))
if errors.Is(err, dsql.ErrNoRows) {
return api.Bucket{}, api.ErrBucketNotFound
} else if err != nil {
return api.Bucket{}, fmt.Errorf("failed to fetch bucket: %w", err)
}
return b, nil
}

func Contracts(ctx context.Context, tx sql.Tx, opts api.ContractsOpts) ([]api.ContractMetadata, error) {
Expand Down

0 comments on commit 984f9e5

Please sign in to comment.