43 Commits

Author SHA1 Message Date
Samuele Pedroni
cbcc460bdc a/snapasserts: tweak/rewrap the DeriveSideInfo* doc comments 2022-04-25 11:05:14 +02:00
Samuele Pedroni
c848f677d8 a/snapasserts: introduce DeriveSideInfoFromDigestAndSize
this is simply split out from DeriveSideInfo
2022-04-22 17:41:14 +02:00
Michael Vogt
277eb06412 many: replace use of "sanity" with more inclusive naming
This commit replaces the use of "sanity" with more inclusive
naming.

When `sanity` is used in a more general sense either `validity`
or `quick` is used.
2022-03-14 18:22:34 +01:00
Paweł Stołowski
7d1fa87e1b Check ignoreValidation condition before the main switch (thanks
pedronis).
2021-10-22 09:56:46 +02:00
Paweł Stołowski
32c8a4c8ab Honor ignoreValidation flag on snaps when checking installed snaps
against enforce validation sets.
2021-10-22 09:52:28 +02:00
Paweł Stołowski
37e4b217c4 Use Ref().PrimaryKey instead of At().PrimaryKey (thanks pedronis). 2021-09-17 09:38:32 +02:00
Paweł Stołowski
b1fbca56a9 Return full validation set keys from CheckPresenceRequired and
CheckPresenceInvalid; full keys including series and sequence are
expected by store api.
2021-09-17 09:38:32 +02:00
Paweł Stołowski
8e094d70b3 Add doc comment to PresenceConstraintError. 2021-07-27 08:18:29 +02:00
Paweł Stołowski
cc9cf4dfdf Fix format. 2021-07-27 08:12:37 +02:00
Paweł Stołowski
9b47121247 Introduce PresenceConstraintError. 2021-07-27 08:12:37 +02:00
Paweł Stołowski
b8afc08fe1 Return an error from CheckPresenceRequired and CheckPresenceInvalid if
the presence if opposite to what the function is about.
2021-07-27 08:12:37 +02:00
Paweł Stołowski
64807cb59c Implement CheckPresenceInvalid and CheckPresenceRequired methods for
ValidationSets.
2021-07-27 08:12:37 +02:00
Samuele Pedroni
f2cdb6dd92 asserts,interfaces,snap: fix imports order (according to gci) 2021-06-14 20:54:41 +02:00
Alberto Mardegan
37e83765f3 asserts: fix errors reported by linter
Besides some trivial fixes, this also adds the (previously unused) class
`isUnacceptedUpdateSuite` to the tests suite.
2021-05-05 10:16:20 +03:00
Paweł Stołowski
eb65e1164e Add unit test. 2021-01-15 14:48:30 +00:00
Paweł Stołowski
8b8d548614 Implement and use byRevision sort for validation sets errors (thanks bboozzoo). 2021-01-14 15:31:10 +00:00
Pawel Stolowski
c80a2deabb Apply suggestions from code review
Add extra comments.

Co-authored-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2021-01-14 09:45:08 +01:00
Paweł Stołowski
d8ad77b1fd Tweak and add more comments (thanks pedronis). 2020-12-09 10:14:12 +01:00
Paweł Stołowski
e075910bd0 Fix handling of not installed cases when presence may be 'conflict', updated tests. 2020-12-08 11:34:33 +01:00
Paweł Stołowski
54758020ba Tweak error formatting (thanks pedronis). 2020-12-08 10:56:06 +01:00
Paweł Stołowski
0f5ad123b8 Print required revisions for snaps at wrong revsions. 2020-12-07 17:01:40 +01:00
Paweł Stołowski
565c104364 No need to create temporary SnapRef, rc is a SnapRef (thanks pedronis). 2020-12-07 16:34:22 +01:00
Paweł Stołowski
869c83b681 Tweaks to error format. 2020-12-07 16:30:08 +01:00
Paweł Stołowski
411d9c2eaf Use naming.SnapRef and SnapSet, handle local snaps, add error string. 2020-12-04 10:39:48 +01:00
Paweł Stołowski
7ae34dbd7a Rework ValidationSetsValidationError. 2020-12-03 18:19:33 +01:00