Files
releases/v1/test/cli/script/eval_bundle_input.txtar
Stephan Renatus 184d1b553f ci: port binary tests to testscript
The assertions are stricter now, e.g. we're also checking that nothing
is emitted to stderr.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2025-08-29 17:57:50 +02:00

35 lines
880 B
Plaintext

# unoptimized
exec $OPA build --bundle bundle
exec $OPA eval --format pretty --bundle bundle.tar.gz --input input.json data.test.result --fail
stdout '^true$'
! stderr .
# unoptimized, stdin
stdin input.json
exec $OPA eval --format pretty --bundle bundle.tar.gz -I data.test.result --fail
stdout '^true$'
! stderr .
# o=1, stdin
exec $OPA build --output o1.tar.gz --optimize 1 --bundle bundle --entrypoint test/result
stdin input.json
exec $OPA eval --format pretty --bundle o1.tar.gz -I data.test.result --fail
stdout '^true$'
! stderr .
# o=2, stdin
exec $OPA build --output o2.tar.gz --optimize 2 --bundle bundle --entrypoint test/result
stdin input.json
exec $OPA eval --format pretty --bundle o1.tar.gz -I data.test.result --fail
stdout '^true$'
! stderr .
-- bundle/data.json --
{}
-- bundle/test.rego --
package test
result if input.yay
-- input.json --
{"yay": true}