Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tahoe-CHK
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
GitLab 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
PrivateStorage
Tahoe-CHK
Commits
7c815142
Commit
7c815142
authored
Jan 21, 2021
by
Jean-Paul Calderone
Browse files
Options
Downloads
Patches
Plain Diff
hlint
parent
78ddd790
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/SpecUpload.hs
+12
-12
12 additions, 12 deletions
test/SpecUpload.hs
with
12 additions
and
12 deletions
test/SpecUpload.hs
+
12
−
12
View file @
7c815142
...
@@ -10,9 +10,13 @@ import Data.ByteString.Base32
...
@@ -10,9 +10,13 @@ import Data.ByteString.Base32
(
encodeBase32Unpadded
(
encodeBase32Unpadded
)
)
import
System.IO
import
System.IO
(
hClose
(
SeekMode
(
AbsoluteSeek
)
,
IOMode
(
ReadMode
,
ReadWriteMode
)
,
Handle
,
hClose
,
hFlush
,
hFlush
,
hSeek
,
hSeek
,
withBinaryFile
)
)
import
System.IO.Temp
import
System.IO.Temp
(
withSystemTempFile
(
withSystemTempFile
...
@@ -45,6 +49,8 @@ import Data.IORef
...
@@ -45,6 +49,8 @@ import Data.IORef
import
Types
import
Types
(
Parameters
(
..
)
(
Parameters
(
..
)
,
Size
,
Required
)
)
import
Upload
import
Upload
...
@@ -52,13 +58,6 @@ import Upload
...
@@ -52,13 +58,6 @@ import Upload
,
adjustSegmentSize
,
adjustSegmentSize
)
)
import
System.IO
(
SeekMode
(
AbsoluteSeek
)
,
IOMode
(
ReadMode
,
ReadWriteMode
)
,
Handle
,
withBinaryFile
)
tests
::
TestTree
tests
::
TestTree
tests
=
testGroup
"Upload"
tests
=
testGroup
"Upload"
[
testConvergence
[
testConvergence
...
@@ -88,16 +87,17 @@ testAdjustSegmentSize = testGroup "adjustSegmentSize"
...
@@ -88,16 +87,17 @@ testAdjustSegmentSize = testGroup "adjustSegmentSize"
assertEqual
""
(
p
131073
3
)
(
adjustSegmentSize
(
p
131072
3
)
104857600
)
assertEqual
""
(
p
131073
3
)
(
adjustSegmentSize
(
p
131072
3
)
104857600
)
]
]
where
where
p
segmentSize
required
=
Parameters
segmentSize
5
4
required
p
::
Size
->
Required
->
Parameters
p
segmentSize
=
Parameters
segmentSize
5
4
testConvergence
::
TestTree
testConvergence
::
TestTree
testConvergence
=
testGroup
"Convergence"
testConvergence
=
testGroup
"Convergence"
[
testCase
"getConvergentKey short data"
$
[
testCase
"getConvergentKey short data"
$
(
uncurry
verifyConvergentKey
)
short
uncurry
verifyConvergentKey
short
,
testCase
"getConvergentKey medium data"
$
,
testCase
"getConvergentKey medium data"
$
(
uncurry
verifyConvergentKey
)
medium
uncurry
verifyConvergentKey
medium
,
testCase
"getConvergentKey long data"
$
,
testCase
"getConvergentKey long data"
$
(
uncurry
verifyConvergentKey
)
long
uncurry
verifyConvergentKey
long
]
]
where
where
--
--
...
...
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