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 dfd4be45b3 Remove any data attrubutes not used in the "YAML tests" (#4817)
Fixes #4813

Signed-off-by: Anders Eknert <anders@eknert.com>
2022-06-28 10:18:35 +02:00
Stephan Renatus bff5399856 ast/term: don't sort an object's keys slice in-place (#3823)
* ast/term: sort-on-insert for object.keys slice

Instead of sorting on each call including Compare() or String(), we'll sort the key
slice on insertion of a new value.

* testcases: add case

As observed in the original issue, the failure does not happen on every
run. To observe the added test case _failing_ on branch main, use a test
call like

    go test -v ./topdown -run TestRego/partialsetdoc:_object_sort_while_iter -count=10 -v

The added `sort_bindings: true` is not required for the topdown eval,
but when executing this on the wasm engine, the (unspecified, non-
guaranteed) order is reversed.

Fixes #3819

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2021-09-27 18:36:18 +02:00
Stephan Renatus 1136df0bfc topdown: use correct bindings in evalVirtualPartial biunify call (#3382)
Before, we were passing `e.bindings` for both terms, result and e.rterm.
The result's bindings, however, are e.rbindings and we should be passing
those to biunify.

Fixes #3369.
Fixes #3376.

Co-authored-by: Torin Sandall <torinsandall@gmail.com>
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2021-04-15 13:03:28 +02:00
Torin Sandall 3982a3eac1 test: Move test cases out of topdown package
Signed-off-by: Torin Sandall <torinsandall@gmail.com>
2020-08-20 12:48:20 -04:00