Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
ZKAPAuthorizer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Administrator
ZKAPAuthorizer
Commits
ce29843c
Commit
ce29843c
authored
3 years ago
by
Jean-Paul Calderone
Browse files
Options
Downloads
Patches
Plain Diff
docstring and light reformatting
parent
9fed776d
No related branches found
Branches containing commit
No related tags found
1 merge request
!248
Turn off implicit lease renewal for allocate_buckets
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/_zkapauthorizer/tests/test_storage_protocol.py
+12
-2
12 additions, 2 deletions
src/_zkapauthorizer/tests/test_storage_protocol.py
with
12 additions
and
2 deletions
src/_zkapauthorizer/tests/test_storage_protocol.py
+
12
−
2
View file @
ce29843c
...
...
@@ -450,8 +450,18 @@ class ShareTests(TestCase):
)
def
get_lease_grant_times
(
storage_server
,
storage_index
):
for
sharenum
,
sharepath
in
storage_server
.
_get_bucket_shares
(
storage_index
):
yield
sharenum
,
list
(
lease
.
get_grant_renew_time_time
()
for
lease
in
get_share_file
(
sharepath
).
get_leases
())
"""
Get the grant times for all of the leases for all of the shares at the
given storage index.
"""
shares
=
storage_server
.
_get_bucket_shares
(
storage_index
)
for
sharenum
,
sharepath
in
shares
:
sharefile
=
get_share_file
(
sharepath
)
leases
=
sharefile
.
get_leases
()
grant_times
=
list
(
lease
.
get_grant_renew_time_time
()
for
lease
in
leases
)
yield
sharenum
,
grant_times
expected_leases
=
{}
# Chop off the non-integer part of the expected values because share
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment