mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
make error actionable when adding operator+leafnodes
There are many examples in the documentation for one half of this configuration or the other, but none which configure a leafnode remote on an operator-authenticated cluster. The error "operator mode requires account nkeys in remotes." is not very clear or actionable.
This commit is contained in:
@@ -2483,7 +2483,9 @@ func TestLeafNodeOperatorBadCfg(t *testing.T) {
|
||||
authorization {
|
||||
account: notankey
|
||||
}`,
|
||||
`operator mode requires account nkeys in remotes`: `remotes: [{url: u}]`,
|
||||
("operator mode requires account nkeys in remotes. " +
|
||||
"Please add an `account` key to each remote in your `leafnodes` section, to assign it to an account. " +
|
||||
"Each account value should be a 56 character public key, starting with the letter 'A'"): `remotes: [{url: u}]`,
|
||||
} {
|
||||
t.Run(errorText, func(t *testing.T) {
|
||||
conf := createConfFile(t, []byte(fmt.Sprintf(`
|
||||
|
||||
Reference in New Issue
Block a user