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
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
15f1e05f
Commit
15f1e05f
authored
Feb 19, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
bad63742
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
14 deletions
+7
-14
go/neo/client_test.go
go/neo/client_test.go
+7
-14
No files found.
go/neo/client_test.go
View file @
15f1e05f
...
...
@@ -47,9 +47,6 @@ import (
// NEOSrv represents running NEO server.
type
NEOSrv
interface
{
// XXX kill or restore?
//ClusterName() string // name of the cluster
//MasterAddr() string // address of the master
URL
()
string
// zurl to access this NEO server
Bugs
()
[]
string
// list of known server bugs
...
...
@@ -169,16 +166,12 @@ func StartNEOPySrv(opt NEOSrvOptions) (_ *NEOPySrv, err error) {
return
n
,
nil
}
func
(
n
*
NEOPySrv
)
C
lusterName
()
string
{
func
(
n
*
NEOPySrv
)
c
lusterName
()
string
{
return
n
.
opt
.
name
}
func
(
n
*
NEOPySrv
)
MasterAddr
()
string
{
return
n
.
masterAddr
}
func
(
n
*
NEOPySrv
)
URL
()
string
{
return
fmt
.
Sprintf
(
"%s%s/%s"
,
n
.
opt
.
URLPrefix
(),
n
.
MasterAddr
(),
n
.
C
lusterName
())
return
fmt
.
Sprintf
(
"%s%s/%s"
,
n
.
opt
.
URLPrefix
(),
n
.
masterAddr
,
n
.
c
lusterName
())
}
func
(
n
*
NEOPySrv
)
Close
()
(
err
error
)
{
...
...
@@ -261,7 +254,7 @@ func StartNEOGoSrv(opt NEOSrvOptions) (_ *NEOGoSrv, err error) {
if
err
!=
nil
{
return
nil
,
err
}
n
.
S
=
NewStorage
(
opt
.
name
,
n
.
M
asterAddr
(),
net
,
n
.
Sback
)
n
.
S
=
NewStorage
(
opt
.
name
,
n
.
m
asterAddr
(),
net
,
n
.
Sback
)
serveWG
.
Go
(
func
(
ctx
context
.
Context
)
error
{
return
n
.
S
.
Run
(
ctx
,
n
.
Sl
)
})
...
...
@@ -320,12 +313,12 @@ func (n *NEOGoSrv) Close() (err error) {
return
err
}
func
(
n
*
NEOGoSrv
)
M
asterAddr
()
string
{
func
(
n
*
NEOGoSrv
)
m
asterAddr
()
string
{
return
n
.
Ml
.
Addr
()
.
String
()
}
func
(
n
*
NEOGoSrv
)
URL
()
string
{
return
fmt
.
Sprintf
(
"%s%s/%s"
,
n
.
opt
.
URLPrefix
(),
n
.
M
asterAddr
(),
n
.
opt
.
name
)
return
fmt
.
Sprintf
(
"%s%s/%s"
,
n
.
opt
.
URLPrefix
(),
n
.
m
asterAddr
(),
n
.
opt
.
name
)
}
...
...
@@ -419,7 +412,7 @@ func withNEOSrv(t *testing.T, f func(t *testing.T, nsrv NEOSrv), optv ...tOption
cmd
:=
exec
.
Command
(
"python"
,
"-c"
,
"from neo.scripts.neomigrate import main; main()"
,
"-q"
,
"-c"
,
npy
.
C
lusterName
(),
"-c"
,
npy
.
c
lusterName
(),
)
if
ssl
{
cmd
.
Args
=
append
(
cmd
.
Args
,
"--ca"
,
neoOpt
.
CA
())
...
...
@@ -428,7 +421,7 @@ func withNEOSrv(t *testing.T, f func(t *testing.T, nsrv NEOSrv), optv ...tOption
}
cmd
.
Args
=
append
(
cmd
.
Args
,
opt
.
Preload
,
npy
.
MasterAddr
()
,
npy
.
masterAddr
,
)
cmd
.
Stdin
=
nil
cmd
.
Stdout
=
os
.
Stdout
...
...
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