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
9984d2b6
Commit
9984d2b6
authored
Oct 18, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
ef7168fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
2 deletions
+30
-2
go/neo/client_test.go
go/neo/client_test.go
+29
-1
go/zodb/storage/zeo/zeo_test.go
go/zodb/storage/zeo/zeo_test.go
+1
-1
No files found.
go/neo/client_test.go
View file @
9984d2b6
...
...
@@ -39,6 +39,8 @@ import (
type
NEOSrv
interface
{
ClusterName
()
string
// name of the cluster
MasterAddr
()
string
// address of the master
Bugs
()
[]
string
// list of known server bugs
}
// NEOPySrv represents running NEO/py server.
...
...
@@ -56,7 +58,11 @@ type NEOPySrv struct {
masterAddr
string
// address of master in spawned cluster
}
// NEOPySrv.Bugs
func
(
_
*
NEOPySrv
)
Bugs
()
[]
string
{
return
[]
string
{
// XXX
}
}
type
NEOPyOptions
struct
{
// nmaster
...
...
@@ -228,6 +234,9 @@ func withNEO(t *testing.T, f func(t *testing.T, nsrv NEOSrv, ndrv *Client), optv
},
optv
...
)
}
// XXX TestHandshake ?
// XXX connect with wrong clusterName -> rejected
func
TestEmptyDB
(
t
*
testing
.
T
)
{
...
...
@@ -236,6 +245,25 @@ func TestEmptyDB(t *testing.T) {
})
}
func
TestLoad
(
t
*
testing
.
T
)
{
X
:=
xtesting
.
FatalIf
(
t
)
data
:=
"../fs1/testdata/1.fs"
txnvOk
,
err
:=
xtesting
.
LoadDBHistory
(
data
);
X
(
err
)
withNEO
(
t
,
func
(
t
*
testing
.
T
,
nsrv
NEOSrv
,
n
*
Client
)
{
xtesting
.
DrvTestLoad
(
t
,
n
,
txnvOk
,
nsrv
.
Bugs
()
...
)
},
tOptions
{
Preload
:
data
,
})
}
func
TestWatch
(
t
*
testing
.
T
)
{
withNEOSrv
(
t
,
func
(
t
*
testing
.
T
,
nsrv
NEOSrv
)
{
xtesting
.
DrvTestWatch
(
t
,
fmt
.
Sprintf
(
"neo://%s@%s"
,
nsrv
.
ClusterName
(),
nsrv
.
MasterAddr
()),
openClientByURL
)
})
}
func
neoOpen
(
zurl
string
,
opt
*
zodb
.
DriverOptions
)
(
_
*
Client
,
at0
zodb
.
Tid
,
err
error
)
{
defer
xerr
.
Contextf
(
&
err
,
"openneo %s"
,
zurl
)
...
...
go/zodb/storage/zeo/zeo_test.go
View file @
9984d2b6
...
...
@@ -253,7 +253,7 @@ func TestEmptyDB(t *testing.T) {
}
func
TestLoad
(
t
*
testing
.
T
)
{
X
:=
exc
.
Raiseif
X
:=
xtesting
.
FatalIf
(
t
)
data
:=
"../fs1/testdata/1.fs"
txnvOk
,
err
:=
xtesting
.
LoadDBHistory
(
data
);
X
(
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