Repository navigation
Proves the at-rest test's UPDATE assertion - #267
Merged
Merged
Conversation
The encrypting :blob_type test in position_blob_at_rest_test.exs had one verified sabotage, and it went red at the INSERT first, so its step UPDATE assertion had never been seen to fail on its own. Records a second sabotage that touches only the UPDATE path: in Storage.Ecto.update_execution/2, dropping position_blob from the set: list and setting it through a query update with type(^blob, :binary). Run against this test, the INSERT assertions passed and the refute on the step's UPDATE parameters went red, since the UPDATE bound the raw position carrying the location. Reverted from a copy; the suite is green. Test-only: no changelog fragment (changelog.d/README.md excludes test-only changes).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proves the step UPDATE assertion of the encrypting
:blob_typetest intest/statifier_persistence/ecto/position_blob_at_rest_test.exson its own.What changed
The test "an encrypting :blob_type keeps the location out of the stored column and the bound blob" had one verified sabotage (the custom blob type answering
:binary), and that mutation turns the test red at the INSERT assertion first, so the refute on the step's UPDATE parameters had never been seen to fail by itself.This adds a second sabotage note above the test, for a mutation that touches only the UPDATE path: in
Storage.Ecto.update_execution/2,position_blobis dropped from theset:list and set through a queryupdatewithtype(^blob, :binary). The INSERT path (do_insert_execution/3) is untouched by it.Observed when run: the two INSERT assertions passed, and the test failed on
refute Enum.any?(updates, ...)("Expected false or nil, got true"): the step's UPDATE bound the raw position, which carries the location. The file was restored from a copy (byte-equal), recompiled with--force, and the test went green again.Comment-only change; no code under
lib/moves.Gate
Full
mix qualitygreen on the committed tree: format, compile (warnings as errors), doc links, dependencies, docs, credo, tests (all passed, coverage above the floor), dialyzer. Postgres from a local server on port 5432.No changelog fragment:
changelog.d/README.mdexcludes test-only changes with no public surface.Review
In-turn review round (a test critic and a diff critic over the branch) before the request opened; the test critic asked that the note name the
set:entry rather than a schema field, and the note says so. No record text in this change, so there is no direction check of a record.