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-datastore
Commits
235fa217
Commit
235fa217
authored
Aug 07, 2018
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test autobatch against the test suite
parent
82516f58
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
19 deletions
+3
-19
autobatch/autobatch_test.go
autobatch/autobatch_test.go
+3
-19
No files found.
autobatch/autobatch_test.go
View file @
235fa217
...
...
@@ -6,27 +6,11 @@ import (
"testing"
ds
"github.com/ipfs/go-datastore"
dstest
"github.com/ipfs/go-datastore/test"
)
func
TestBasicPuts
(
t
*
testing
.
T
)
{
d
:=
NewAutoBatching
(
ds
.
NewMapDatastore
(),
16
)
k
:=
ds
.
NewKey
(
"test"
)
v
:=
[]
byte
(
"hello world"
)
err
:=
d
.
Put
(
k
,
v
)
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
out
,
err
:=
d
.
Get
(
k
)
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
if
!
bytes
.
Equal
(
out
,
v
)
{
t
.
Fatal
(
"wasnt the same! ITS NOT THE SAME"
)
}
func
TestAutobatch
(
t
*
testing
.
T
)
{
dstest
.
SubtestAll
(
t
,
NewAutoBatching
(
ds
.
NewMapDatastore
(),
16
))
}
func
TestFlushing
(
t
*
testing
.
T
)
{
...
...
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