The connections request asks for user names, which the server leaves out otherwise (issue 1147)
This commit is contained in:
@@ -116,8 +116,10 @@ func TestNatsTheSystemAccountsExportsReachMeshOnAReload(t *testing.T) { // 1147/
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
hears(connects, "connect")
|
hears(connects, "connect")
|
||||||
// The answer to the connections request lists the open connections, the shop's among them.
|
// The answer to the connections request lists the open connections, the shop's among them. The server names the
|
||||||
reply, err := watchman.Request(BusConnzSubject, []byte(`{}`), 5*time.Second)
|
// account from the subject the export clamps (MESH), but leaves the user's name out unless the request asks for it
|
||||||
|
// with "auth": true (monitor.go ConnzOptions.Username), so the watchman asks so.
|
||||||
|
reply, err := watchman.Request(BusConnzSubject, []byte(`{"auth":true}`), 5*time.Second)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("mesh.bus.connz is not answered: %v", err)
|
t.Fatalf("mesh.bus.connz is not answered: %v", err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user