Philip Meulengracht
d1f1074adf
asserts: review feedback
...
add Optional to the sequence check, change error for wrongly formatted validation-set entry
2023-03-10 07:22:44 +01:00
Philip Meulengracht
6c167b9ab6
asserts: review feedback
...
clarify error description if specifying an invalid sequence
2023-03-10 07:22:44 +01:00
Philip Meulengracht
9a006ce79d
asserts: review feedback
...
dont allow 0 in sequence, remove checkDefaultIntWhat as its not needed anymore, add unit test for the 0 case
2023-03-10 07:22:44 +01:00
Philip Meulengracht
77c9bfb609
asserts: review feedback
...
improve error messages, add missing unit test cases for these errors
2023-03-10 07:22:43 +01:00
Philip Meulengracht
080f154631
asserts: review feedback
...
use 'what' methods instead to provide error context when data members are invalid, change certain error messages to align with the rest, and introduce a What variant of checkIntWithDefault
2023-03-10 07:22:43 +01:00
Philip Meulengracht
b3f15803d1
asserts: remove monitor as a mode
2023-03-10 07:22:43 +01:00
Philip Meulengracht
1f903f7524
asserts: default to brand ID when account ID is not set
2023-03-10 07:22:42 +01:00
Philip Meulengracht
b18a7aab80
asserts: support validation-sets in model assertion
2023-03-10 07:22:42 +01:00
Philip Meulengracht
ae6489f798
golang: remove deadcode linter
2023-03-09 14:43:47 +01:00
Zeyad Yasser
12ad23f53a
fix infinite recursion in errors.Is(err, &NotFoundError{})
2023-02-09 16:02:40 +00:00
Zeyad Yasser
54c6a1d8c3
refactor: replace IsNotFound usages for errors.Is(err, &NotFoundError{})
2023-02-09 16:02:40 +00:00
Miguel Pires
d097436c1c
many: fix formatting w/ gofmt 1.19
...
Go 1.19 includes some changes to gofmt which intend to make lists and
heading clearer when rendered (https://go.dev/doc/go1.19 ). This commit
is the result of running the new gofmt and manually fixing some of it.
This was necessary because the new gofmt assumed lines beginning w/ tabs
to start lists or examples. While this is often true in our codebase,
we occasionally also use tabs to indent the lines after a TODO or FIXME
prefix or in yaml (e.g., excerpts of a snap.yaml). This meant that a lot of the
reformatted comments were broken and had to be fixed manually.
Signed-off-by: Miguel Pires <miguel.pires@canonical.com >
2023-01-16 14:23:11 +01:00
Philip Meulengracht
99302b1ad3
asserts: review feedback
...
update maxSupportedFormat to 2, update test, add check that UserExpiration is empty by default
2022-10-19 10:38:34 +02:00
Philip Meulengracht
2afc347391
asserts: reverse logic check
2022-10-19 09:26:01 +02:00
Philip Meulengracht
957f45b5af
asserts: review feedback
...
update doc and error text, update unit tests
2022-10-19 09:13:29 +02:00
Philip Meulengracht
30cbadccf5
asserts: require header format 2 to use the new user-presence variable
2022-10-19 09:10:36 +02:00
Philip Meulengracht
ae9eee9ee5
asserts: rename user-valid-for to user-presence, add unit test specifically to verify that the member is optional, fix current logic determining this
2022-10-18 08:29:06 +02:00
Philip Meulengracht
14d7b7fb4f
asserts: move the possitive test into TestDecodeOK
2022-10-13 12:48:18 +02:00
Philip Meulengracht
a22d1b8b41
asserts: review feedback
...
remove the duration part of the functionality after discussions on this subject. This cleans up a bit a code. Folded all unit tests into the DecodeOK/Invalid
2022-10-13 12:47:56 +02:00
Philip Meulengracht
bc6f4eac85
asserts: corrections to error messages, and corrections to docs
2022-10-10 09:18:41 +02:00
Philip Meulengracht
b0c7ae1e69
asserts: add support in system user assertion for keyword 'user-valid-for'
2022-10-10 09:10:14 +02:00
Samuele Pedroni
fcd9668e0c
asserts,o/devicestate: fix typos and clarify naming
...
thanks @Meulengracht and @mardy
2022-10-07 18:40:58 +02:00
Samuele Pedroni
58bb6b4f21
many: support explicitly allowing classic snaps in extended models
2022-10-06 18:05:00 +02:00
Miguel Pires
f854897ee0
Merge pull request #12203 from MiguelPires/refresh-enforce-overlord
...
overlord: auto-resolve validation set enforcement constraints
2022-10-03 17:14:13 +01:00
Miguel Pires
4c6fdc2164
many: add tests for error Is()
...
Signed-off-by: Miguel Pires <miguel.pires@canonical.com >
2022-10-03 10:22:01 +01:00