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
23e05d02
Commit
23e05d02
authored
5 years ago
by
Jean-Paul Calderone
Browse files
Options
Downloads
Patches
Plain Diff
add some missing cleanup
parent
2fecdb2f
No related branches found
Branches containing commit
No related tags found
1 merge request
!49
Correct pass count for mutable writes
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/_zkapauthorizer/tests/test_storage_server.py
+11
-1
11 additions, 1 deletion
src/_zkapauthorizer/tests/test_storage_server.py
with
11 additions
and
1 deletion
src/_zkapauthorizer/tests/test_storage_server.py
+
11
−
1
View file @
23e05d02
...
...
@@ -61,6 +61,9 @@ from .strategies import (
from
.fixtures
import
(
AnonymousStorageServer
,
)
from
.storage_common
import
(
cleanup_storage_server
,
)
from
..api
import
(
ZKAPAuthorizerStorageServer
,
MorePassesRequired
,
...
...
@@ -107,13 +110,16 @@ class PassValidationTests(TestCase):
),
)
def
test_allocate_buckets_fails_without_enough_passes
(
self
):
"""
``remote_allocate_buckets`` fails with ``MorePassesRequired`` if it is
passed fewer passes than it requires for the amount of data to be
stored.
"""
# Hypothesis causes our storage server to be used many times. Clean
# up between iterations.
cleanup_storage_server
(
self
.
anonymous_storage_server
)
required_passes
=
2
share_nums
=
{
3
,
7
}
allocated_size
=
int
((
required_passes
*
BYTES_PER_PASS
)
/
len
(
share_nums
))
...
...
@@ -158,6 +164,10 @@ class PassValidationTests(TestCase):
initial writes on shares without supplying passes, the operation fails
with ``MorePassesRequired``.
"""
# Hypothesis causes our storage server to be used many times. Clean
# up between iterations.
cleanup_storage_server
(
self
.
anonymous_storage_server
)
data
=
b
"
01234567
"
offset
=
0
sharenum
=
0
...
...
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