Skip to content

Commit

Permalink
testcases: Fix duplicate yaml test keys (open-policy-agent#4970)
Browse files Browse the repository at this point in the history
* testcases: Fix missing `modules` in units tests.

Signed-off-by: Philip Conrad <[email protected]>

* test/cases/units: Fix YAML formatting in units regression test.

Signed-off-by: Philip Conrad <[email protected]>
  • Loading branch information
philipaconrad authored Aug 4, 2022
1 parent 85d28ff commit 73c943e
Showing 1 changed file with 34 additions and 29 deletions.
63 changes: 34 additions & 29 deletions test/cases/testdata/units/test-issue-4856.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
---
cases:
- data:
modules:
- |
package test
p {
units.parse("500m") == 0.5
}
note: units_parse/exact comparison - regression case 1
query: data.test.p = x
want_result:
- x: true
- |
package test
p {
units.parse("0.0005K") == 0.5
}
note: units_parse/exact comparison - regression case 2
query: data.test.p = x
want_result:
- x: true
- |
package test
p {
units.parse("0.0000005M") == 0.5
}
note: units_parse/exact comparison - regression case 3
query: data.test.p = x
want_result:
- x: true
- data:
modules:
- |
package test
p {
units.parse("500m") == 0.5
}
note: units_parse/exact comparison - regression case 1
query: data.test.p = x
want_result:
- x: true
- data:
modules:
- |
package test
p {
units.parse("0.0005K") == 0.5
}
note: units_parse/exact comparison - regression case 2
query: data.test.p = x
want_result:
- x: true
- data:
modules:
- |
package test
p {
units.parse("0.0000005M") == 0.5
}
note: units_parse/exact comparison - regression case 3
query: data.test.p = x
want_result:
- x: true

0 comments on commit 73c943e

Please sign in to comment.