average-breakfast-91545
06/18/2023, 10:05 AMassert len(packages) == 1
assert packages[0].digest == expected_digest(docker_target)
broad-processor-92400
06/18/2023, 10:24 AMCreateDigest
request type, that can be used with FileContents
. I don’t know if there’s a better way to create “dummy” ones for testsaverage-breakfast-91545
06/18/2023, 10:28 AMdummy_digest(some_value)
seems like it's such a useful thing that I'm assuming there's a very good reason why it's not already present.average-breakfast-91545
06/18/2023, 10:29 AMbroad-processor-92400
06/18/2023, 10:34 AMDigest()
directly. I imagine this can’t be actually used by the engine (eg materialising it onto disk will fail), but may be appropriate for what you want?average-breakfast-91545
06/18/2023, 10:35 AMbroad-processor-92400
06/18/2023, 10:36 AMrule_runner.request
is the sync-testing equivalent to await Get()
broad-processor-92400
06/18/2023, 10:36 AMaverage-breakfast-91545
06/18/2023, 10:37 AMaverage-breakfast-91545
06/18/2023, 10:38 AMbroad-processor-92400
06/18/2023, 10:39 AMDigest()
call, and probably for not much value other than tests running slower (ie mock digest might be the way to go)average-breakfast-91545
06/18/2023, 10:39 AMaverage-breakfast-91545
06/18/2023, 10:40 AMbroad-processor-92400
06/18/2023, 10:41 AMpeek_test.py
(that particular case needed a Snapshot
so the helper is very slightly more vigorous than just a digest) if that helps… but I’m unreliable as a source of good advice 😅average-breakfast-91545
06/18/2023, 10:42 AMbroad-processor-92400
06/18/2023, 10:42 AMfast-nail-55400
06/18/2023, 3:45 PMmake_snapshot
method on the RuleRunner
?fast-nail-55400
06/18/2023, 3:45 PMSnapshot
.average-breakfast-91545
06/18/2023, 5:05 PM