Skip to content

Commit

Permalink
fix(pollux): add asc ordering to the VerificationPolicy constraints A…
Browse files Browse the repository at this point in the history
…TL-6040

Signed-off-by: Yurii Shynbuiev <yurii.shynbuiev@iohk.io>
  • Loading branch information
yshyn-iohk committed Oct 24, 2023
1 parent 0bd234e commit 5a38b6e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ object VerificationPolicySql extends DoobieContext.Postgres(SnakeCase) {
def getVerificationPolicyConstrains(fk_ids: Seq[UUID]) =
run(
quote(
query[VerificationPolicyConstraint].filter(vpc => liftQuery(fk_ids).contains(vpc.fk_id))
query[VerificationPolicyConstraint]
.filter(vpc => liftQuery(fk_ids).contains(vpc.fk_id))
.sortBy(_.index)(Ord.asc)
)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ object VerificationPolicySqlIntegrationSpec extends ZIOSpecDefault, PostgresTest
name <- name
description <- description
constraints <- Gen
.setOfBounded(min = 1, max = 10)(verificationPolicyConstraint)
.setOfBounded(min = 2, max = 10)(verificationPolicyConstraint)
.map(_.toVector)
} yield VerificationPolicy.make(
name = name,
Expand Down

0 comments on commit 5a38b6e

Please sign in to comment.