mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Change ByID boolean to Peer string and add Peer id in replicas output
The CLI will now be able to display the peer IDs in MetaGroupInfo if it choses to do so, and possibly help user select the peer ID from a list with a new command to remove by peer ID instead of by server name. Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
@@ -7317,8 +7317,7 @@ func TestJetStreamClusterRemovePeerByID(t *testing.T) {
|
||||
require_True(t, IsNatsErr(resp.Error, JSClusterServerNotMemberErr))
|
||||
|
||||
// Now try by ID, but first with an ID that does not match any peerID
|
||||
req.Server = "some_bad_id"
|
||||
req.ByID = true
|
||||
req.Peer = "some_bad_id"
|
||||
jsreq, err = json.Marshal(req)
|
||||
require_NoError(t, err)
|
||||
rmsg, err = nc.Request(JSApiRemoveServer, jsreq, 2*time.Second)
|
||||
@@ -7331,7 +7330,7 @@ func TestJetStreamClusterRemovePeerByID(t *testing.T) {
|
||||
require_True(t, IsNatsErr(resp.Error, JSClusterServerNotMemberErr))
|
||||
|
||||
// Now with the proper peer ID
|
||||
req.Server = peerID
|
||||
req.Peer = peerID
|
||||
jsreq, err = json.Marshal(req)
|
||||
require_NoError(t, err)
|
||||
rmsg, err = nc.Request(JSApiRemoveServer, jsreq, 2*time.Second)
|
||||
|
||||
Reference in New Issue
Block a user