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
cd5452b5
Commit
cd5452b5
authored
3 years ago
by
Jean-Paul Calderone
Browse files
Options
Downloads
Patches
Plain Diff
black
parent
ce29843c
No related branches found
Branches containing commit
No related tags found
1 merge request
!248
Turn off implicit lease renewal for allocate_buckets
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/_zkapauthorizer/tests/foolscap.py
+1
-0
1 addition, 0 deletions
src/_zkapauthorizer/tests/foolscap.py
src/_zkapauthorizer/tests/test_storage_protocol.py
+9
-4
9 additions, 4 deletions
src/_zkapauthorizer/tests/test_storage_protocol.py
with
10 additions
and
4 deletions
src/_zkapauthorizer/tests/foolscap.py
+
1
−
0
View file @
cd5452b5
...
...
@@ -43,6 +43,7 @@ class StubStorageServer(object):
def
set_implicit_slot_lease_renewal
(
self
,
enabled
):
pass
def
get_anonymous_storage_server
():
return
StubStorageServer
()
...
...
This diff is collapsed.
Click to expand it.
src/_zkapauthorizer/tests/test_storage_protocol.py
+
9
−
4
View file @
cd5452b5
...
...
@@ -466,10 +466,15 @@ class ShareTests(TestCase):
expected_leases
=
{}
# Chop off the non-integer part of the expected values because share
# files only keep integer precision.
expected_leases
.
update
({
sharenum
:
[
int
(
when
)]
for
sharenum
in
existing_sharenums
})
expected_leases
.
update
({
sharenum
:
[
int
(
when
+
interval
)]
for
sharenum
in
all_sharenums
-
existing_sharenums
})
expected_leases
.
update
(
{
sharenum
:
[
int
(
when
)]
for
sharenum
in
existing_sharenums
}
)
expected_leases
.
update
(
{
sharenum
:
[
int
(
when
+
interval
)]
for
sharenum
in
all_sharenums
-
existing_sharenums
}
)
self
.
assertThat
(
dict
(
get_lease_grant_times
(
self
.
anonymous_storage_server
,
storage_index
)),
...
...
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