Commit 15f1e05f authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent bad63742
......@@ -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) ClusterName() string {
func (n *NEOPySrv) clusterName() 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.ClusterName())
return fmt.Sprintf("%s%s/%s", n.opt.URLPrefix(), n.masterAddr, n.clusterName())
}
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.MasterAddr(), net, n.Sback)
n.S = NewStorage(opt.name, n.masterAddr(), 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) MasterAddr() string {
func (n *NEOGoSrv) masterAddr() string {
return n.Ml.Addr().String()
}
func (n *NEOGoSrv) URL() string {
return fmt.Sprintf("%s%s/%s", n.opt.URLPrefix(), n.MasterAddr(), n.opt.name)
return fmt.Sprintf("%s%s/%s", n.opt.URLPrefix(), n.masterAddr(), 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.ClusterName(),
"-c", npy.clusterName(),
)
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment