-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bearer: Improvements and test coverage #626
Conversation
cthulhu-rider
commented
Sep 18, 2024
- after session: Improvements and test coverage #612
393c5f9
to
f0018c8
Compare
Same as f17fc15. Signed-off-by: Leonard Lyubich <[email protected]>
Same as b9b920d. Signed-off-by: Leonard Lyubich <[email protected]>
Has been forgotten in 2cca6c7. Signed-off-by: Leonard Lyubich <[email protected]>
f0018c8
to
d1e6d97
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #626 +/- ##
==========================================
+ Coverage 54.19% 55.36% +1.16%
==========================================
Files 164 164
Lines 19191 19203 +12
==========================================
+ Hits 10401 10631 +230
+ Misses 8362 8183 -179
+ Partials 428 389 -39 ☔ View full report in Codecov by Sentry. |
e0242b1
to
6ea9f9c
Compare
b4abd08
to
83bfa4a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like 2a37283 does much more than expected from its message.
83bfa4a
to
4303331
Compare
oops rebase sheet, fixed |
Bearer token type provides `EACLTable` method to access underlying eACL. It states that if the table is unset, zero instance is returned. The problem is that `eacl.Table` type did not implement `comparable` constraint. So, there is no way to check whether eACL instance is zero or not. Therefore, there was no way to find out whether the token contained a table. This adds `eacl.Table.IsZero` method allowing to check the eACL presence. Currently, it covers all cases where table is required incl. bearer tokens. Signed-off-by: Leonard Lyubich <[email protected]>
Signed-off-by: Leonard Lyubich <[email protected]>
Previously, bearer and session token types provided `InvalidAt` method checking whether the token is invalid at the given epoch. This was not a very good choice, since users are more naturally inclined to work with affirmative methods. In this case, the validity check, not the invalidity one. This extends interface of NeoFS tokens with `ValidAt` method. `InvalidAt` ones are marked deprecated. Signed-off-by: Leonard Lyubich <[email protected]>
Signed-off-by: Leonard Lyubich <[email protected]>
Signed-off-by: Leonard Lyubich <[email protected]>
Signed-off-by: Leonard Lyubich <[email protected]>
// IsZero checks whether all fields of the table are zero/empty. The property | ||
// can be used as a marker of unset eACL. | ||
func (t Table) IsZero() bool { | ||
return t.cid.IsZero() && len(t.records) == 0 && t.version == version.Version{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not covered.