mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-22 03:30:35 +00:00
rpc: fix erroneous error-message in test (#28227)
This commit is contained in:
parent
2091ebdf5e
commit
7963c4e808
@ -32,7 +32,8 @@ func TestServerRegisterName(t *testing.T) {
|
|||||||
server := NewServer()
|
server := NewServer()
|
||||||
service := new(testService)
|
service := new(testService)
|
||||||
|
|
||||||
if err := server.RegisterName("test", service); err != nil {
|
svcName := "test"
|
||||||
|
if err := server.RegisterName(svcName, service); err != nil {
|
||||||
t.Fatalf("%v", err)
|
t.Fatalf("%v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,9 +41,9 @@ func TestServerRegisterName(t *testing.T) {
|
|||||||
t.Fatalf("Expected 2 service entries, got %d", len(server.services.services))
|
t.Fatalf("Expected 2 service entries, got %d", len(server.services.services))
|
||||||
}
|
}
|
||||||
|
|
||||||
svc, ok := server.services.services["test"]
|
svc, ok := server.services.services[svcName]
|
||||||
if !ok {
|
if !ok {
|
||||||
t.Fatalf("Expected service calc to be registered")
|
t.Fatalf("Expected service %s to be registered", svcName)
|
||||||
}
|
}
|
||||||
|
|
||||||
wantCallbacks := 14
|
wantCallbacks := 14
|
||||||
|
Loading…
Reference in New Issue
Block a user