Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-unixfs
Commits
e8af7a6b
Commit
e8af7a6b
authored
Oct 24, 2018
by
Kejie Zhang
Committed by
Lucas Molas
Oct 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
document testDagSync function
parent
f573b7b5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
mod/dagmodifier_test.go
mod/dagmodifier_test.go
+4
-0
No files found.
mod/dagmodifier_test.go
View file @
e8af7a6b
...
...
@@ -412,6 +412,8 @@ func testDagTruncate(t *testing.T, opts testu.NodeOpts) {
}
}
// TestDagSync tests that a DAG will expand sparse during sync
// if offset > curNode's size.
func TestDagSync(t *testing.T) {
dserv := testu.GetDAGServ()
nd := dag.NodeWithData(unixfs.FilePBData(nil, 0))
...
...
@@ -434,6 +436,7 @@ func TestDagSync(t *testing.T) {
t.Fatal(err)
}
// Truncate leave the offset at 5 and filesize at 0
err = dagmod.Truncate(0)
if err != nil {
t.Fatal(err)
...
...
@@ -444,6 +447,7 @@ func TestDagSync(t *testing.T) {
t.Fatal(err)
}
// When Offset > filesize , Sync will call enpandSparse
err = dagmod.Sync()
if err != nil {
t.Fatal(err)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment