Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
6312399d
Commit
6312399d
authored
Jun 06, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
28fb1ee8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
go/neo/cluster_test.go
go/neo/cluster_test.go
+5
-4
No files found.
go/neo/cluster_test.go
View file @
6312399d
...
@@ -38,19 +38,19 @@ import (
...
@@ -38,19 +38,19 @@ import (
// xfs1stor creates new NEO storage node backed by fs1
// xfs1stor creates new NEO storage node backed by fs1
// XXX is this wrapper a good idea?
// XXX is this wrapper a good idea?
func
xfs1stor
(
path
string
)
(
*
Storage
,
*
fs1
.
FileStorage
)
{
func
xfs1stor
(
net
Network
,
path
string
)
(
*
Storage
,
*
fs1
.
FileStorage
)
{
// TODO +readonly ?
// TODO +readonly ?
zstor
,
err
:=
fs1
.
Open
(
context
.
Background
(),
path
)
zstor
,
err
:=
fs1
.
Open
(
context
.
Background
(),
path
)
exc
.
Raiseif
(
err
)
exc
.
Raiseif
(
err
)
return
NewStorage
(
zstor
),
zstor
return
NewStorage
(
"test cluster"
,
"TODO master"
,
""
,
net
,
zstor
),
zstor
}
}
// M drives cluster with 1 S through recovery -> verification -> service -> shutdown
// M drives cluster with 1 S through recovery -> verification -> service -> shutdown
func
TestMasterStorage
(
t
*
testing
.
T
)
{
func
TestMasterStorage
(
t
*
testing
.
T
)
{
net
:=
NetPipe
(
""
)
// test network FIXME New registers to global table
net
:=
NetPipe
(
""
)
// test network FIXME New registers to global table
M
:=
NewMaster
(
"abc1"
)
M
:=
NewMaster
(
"abc1"
)
S
,
_
:=
xfs1stor
(
"../zodb/storage/fs1/testdata/1.fs"
)
// XXX +readonly
S
,
_
:=
xfs1stor
(
net
,
"../zodb/storage/fs1/testdata/1.fs"
)
// XXX +readonly
Mctx
,
Mcancel
:=
context
.
WithCancel
(
context
.
Background
())
Mctx
,
Mcancel
:=
context
.
WithCancel
(
context
.
Background
())
Sctx
,
Scancel
:=
context
.
WithCancel
(
context
.
Background
())
Sctx
,
Scancel
:=
context
.
WithCancel
(
context
.
Background
())
...
@@ -70,7 +70,8 @@ func TestClientStorage(t *testing.T) {
...
@@ -70,7 +70,8 @@ func TestClientStorage(t *testing.T) {
Sctx
,
Scancel
:=
context
.
WithCancel
(
context
.
Background
())
Sctx
,
Scancel
:=
context
.
WithCancel
(
context
.
Background
())
S
,
zstor
:=
xfs1stor
(
"../zodb/storage/fs1/testdata/1.fs"
)
// XXX +readonly
net
:=
NetPipe
(
""
)
// XXX here? (or a bit above?)
S
,
zstor
:=
xfs1stor
(
net
,
"../zodb/storage/fs1/testdata/1.fs"
)
// XXX +readonly
wg
.
Gox
(
func
()
{
wg
.
Gox
(
func
()
{
S
.
ServeLink
(
Sctx
,
Snl
)
S
.
ServeLink
(
Sctx
,
Snl
)
// XXX + test error return
// XXX + test error return
...
...
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