5 Commits

Author SHA1 Message Date
Philip Conrad 63e1877c48 linters+testdata: Reformat all yaml testcases for linting. (#6511)
This commit adds a config for yamllint, mass-reformats all of
the existing Yaml testcases to pass linting, and adds a Yaml
linting job to the pull-request Github Actions workflow. A few 
careful exceptions and ignores were added to the linter's
config to allow keeping our existing Yaml files with minimal
reformatting.

Signed-off-by: Philip Conrad <philipaconrad@gmail.com>
2024-01-10 13:16:01 -05:00
Anders Eknert 8dc77b0e8e Fix inconsistent error messages in units.parse* (#5046)
Adding `error: ` to each message is redundant, and breaks tooling
that expects a uniform format of `<builtin-name>: message` in error
messages from OPA (i.e. Jarl 😄).

Signed-off-by: Anders Eknert <anders@eknert.com>
2022-08-24 11:00:45 +02:00
Anders Eknert 85d28ffb7a Add error type to units.* builtin test assertions (#4966)
Signed-off-by: Anders Eknert <anders@eknert.com>
2022-08-04 12:49:36 +02:00
Philip Conrad 953c2fb5c0 test/units: Add "units_" prefix to tests. (#4703)
Add "units_" prefix to all units-related test cases, so that they are
easier to find and run manually.

Signed-off-by: Philip Conrad <philipaconrad@gmail.com>
2022-05-23 20:45:32 +02:00
Stephan Renatus df0bbf900f topdown: misc changes to units.parse_bytes (#3672)
* topdown: port units.parse_bytes() tests to external yaml tests
* topdown/units.parse_bytes: add test for lowercase/quotes behaviour
* topdown/units.parse_bytes: misc improvements
* using int64, and the big.Int, big.Float types consistently
* replaced use of deprecated registeration function

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2021-07-23 19:53:38 +02:00