Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
neoppod
Commits
44cb53de
Commit
44cb53de
authored
8 years ago
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
da9896b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
1 deletion
+38
-1
t/neo/zodb/cmd/zodbdump/testdata/1.zdump.ok
t/neo/zodb/cmd/zodbdump/testdata/1.zdump.ok
+0
-0
t/neo/zodb/cmd/zodbdump/zodbdump_test.go
t/neo/zodb/cmd/zodbdump/zodbdump_test.go
+38
-1
No files found.
t/neo/zodb/cmd/zodbdump/testdata/1.zdump
→
t/neo/zodb/cmd/zodbdump/testdata/1.zdump
.ok
View file @
44cb53de
File moved
This diff is collapsed.
Click to expand it.
t/neo/zodb/cmd/zodbdump/zodbdump_test.go
View file @
44cb53de
// TODO copyright/license
package
main
package
main
//go:generate sh -c "python2 -m zodbtool.zodbdump testdata/1.conf >testdata/1.zdump"
//go:generate sh -c "python2 -m zodbtool.zodbdump testdata/1.conf >testdata/1.zdump.ok"
import
(
"bytes"
"io/ioutil"
"testing"
"../../../storage/fs1"
"../../../zodb"
"lab.nexedi.com/kirr/go123/exc"
)
func
TestZodbDump
(
t
*
testing
.
T
)
{
buf
:=
bytes
.
Buffer
{}
fs
,
err
:=
fs1
.
Open
(
"../../../storage/fs1/testdata/1.fs"
)
// XXX read-only, path?
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
defer
exc
.
XRun
(
fs
.
Close
)
err
=
zodbDump
(
&
buf
,
fs
,
0
,
zodb
.
TidMax
,
false
)
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
dumpOk
,
err
:=
ioutil
.
ReadFile
(
"testdata/1.zdump.ok"
)
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
if
!
bytes
.
Equal
(
dumpOk
,
buf
.
Bytes
())
{
t
.
Errorf
(
"dump different TODO show diff"
)
// XXX github.com/sergi/go-diff.git
}
}
This diff is collapsed.
Click to expand it.
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