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
8509b93d
Commit
8509b93d
authored
Dec 29, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
f4a90b6b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
go/internal/xtesting/xtesting.go
go/internal/xtesting/xtesting.go
+16
-5
go/neo/client_test.go
go/neo/client_test.go
+1
-1
No files found.
go/internal/xtesting/xtesting.go
View file @
8509b93d
...
...
@@ -275,10 +275,7 @@ func checkLoad(t *testing.T, zdrv zodb.IStorageDriver, xid zodb.Xid, expect objS
//
// txnvOk is what data to expect to be in the database.
func
DrvTestLoad
(
t
*
testing
.
T
,
zdrv
zodb
.
IStorageDriver
,
txnvOk
[]
Txn
,
bugv
...
string
)
{
bugs
:=
map
[
string
]
bool
{}
for
_
,
bug
:=
range
bugv
{
bugs
[
bug
]
=
true
}
bugs
:=
argv2map
(
bugv
)
// current knowledge of what was "before" for an oid as we scan over
// data base entries
...
...
@@ -332,9 +329,13 @@ func DrvTestLoad(t *testing.T, zdrv zodb.IStorageDriver, txnvOk []Txn, bugv ...s
}
// DrvTestWatch verifies that storage driver watcher can observe commits done from outside.
func
DrvTestWatch
(
t
*
testing
.
T
,
zurl
string
,
zdrvOpen
zodb
.
DriverOpener
)
{
func
DrvTestWatch
(
t
*
testing
.
T
,
zurl
string
,
zdrvOpen
zodb
.
DriverOpener
,
bugv
...
string
)
{
X
:=
FatalIf
(
t
)
bugs
:=
argv2map
(
bugv
)
if
bugs
[
"nocommit"
]
{
t
.
Skip
(
"skipping: server does not implement commit"
)
}
NeedPy
(
t
,
"zodbtools"
)
u
,
err
:=
url
.
Parse
(
zurl
);
X
(
err
)
...
...
@@ -455,6 +456,16 @@ func FatalIf(t *testing.T) func(error) {
}
}
// argv2map converts ...string to map[string]bool.
// it is handy to use e.g. to convert ...bugv to bugs {}.
func
argv2map
(
argv
[]
string
)
map
[
string
]
bool
{
dict
:=
map
[
string
]
bool
{}
for
_
,
arg
:=
range
argv
{
dict
[
arg
]
=
true
}
return
dict
}
// b is syntactic sugar for byte literals.
//
...
...
go/neo/client_test.go
View file @
8509b93d
...
...
@@ -525,7 +525,7 @@ func TestLoad(t *testing.T) {
func
TestWatch
(
t
*
testing
.
T
)
{
withNEOSrv
(
t
,
func
(
t
*
testing
.
T
,
nsrv
NEOSrv
)
{
xtesting
.
DrvTestWatch
(
t
,
nsrv
.
URL
(),
openClientByURL
)
xtesting
.
DrvTestWatch
(
t
,
nsrv
.
URL
(),
openClientByURL
,
nsrv
.
Bugs
()
...
)
})
}
...
...
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