aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--node/node_test.go28
1 files changed, 24 insertions, 4 deletions
diff --git a/node/node_test.go b/node/node_test.go
index 372fc6b10..1378a712a 100644
--- a/node/node_test.go
+++ b/node/node_test.go
@@ -514,12 +514,32 @@ func TestAPIGather(t *testing.T) {
}{
"Zero APIs": {[]rpc.API{}, InstrumentedServiceMakerA},
"Single API": {[]rpc.API{
- {"single", "1", &OneMethodApi{fun: func() { calls <- "single.v1" }}, true},
+ {
+ Namespace: "single",
+ Version: "1",
+ Service: &OneMethodApi{fun: func() { calls <- "single.v1" }},
+ Public: true,
+ },
}, InstrumentedServiceMakerB},
"Many APIs": {[]rpc.API{
- {"multi", "1", &OneMethodApi{fun: func() { calls <- "multi.v1" }}, true},
- {"multi.v2", "2", &OneMethodApi{fun: func() { calls <- "multi.v2" }}, true},
- {"multi.v2.nested", "2", &OneMethodApi{fun: func() { calls <- "multi.v2.nested" }}, true},
+ {
+ Namespace: "multi",
+ Version: "1",
+ Service: &OneMethodApi{fun: func() { calls <- "multi.v1" }},
+ Public: true,
+ },
+ {
+ Namespace: "multi.v2",
+ Version: "2",
+ Service: &OneMethodApi{fun: func() { calls <- "multi.v2" }},
+ Public: true,
+ },
+ {
+ Namespace: "multi.v2.nested",
+ Version: "2",
+ Service: &OneMethodApi{fun: func() { calls <- "multi.v2.nested" }},
+ Public: true,
+ },
}, InstrumentedServiceMakerC},
}
for id, config := range services {