MXS-2984: Fix list listeners
Backported the changed from 2.5 to 2.3 and added a test case.
This commit is contained in:
parent
ce437bc779
commit
2e1b0c5ddf
@ -197,7 +197,7 @@ module.exports = function() {
|
||||
row = []
|
||||
|
||||
fields.forEach(function(p) {
|
||||
var v = _.getPath(i, p[p.name], '')
|
||||
var v = _.getPath(i, p.path, '')
|
||||
|
||||
if (Array.isArray(v) && typeof(v[0]) != 'object') {
|
||||
v = v.join(', ')
|
||||
|
@ -87,7 +87,7 @@ const list_listeners_fields = [
|
||||
},
|
||||
{
|
||||
name: 'Host',
|
||||
path: 'attributes.parameters.host',
|
||||
path: 'attributes.parameters.address',
|
||||
description: 'The address or socket where the listener listens'
|
||||
},
|
||||
{
|
||||
|
@ -42,6 +42,16 @@ describe("Diagnostic Commands", function() {
|
||||
});
|
||||
})
|
||||
|
||||
it('MXS-2984: Malformed `list listeners` output', function() {
|
||||
return doCommand('list listeners RW-Split-Router --tsv')
|
||||
.then(res => {
|
||||
var d = res.split('\t')
|
||||
d[0].should.equal('RW-Split-Listener')
|
||||
d[1].should.equal('4006')
|
||||
d[2].should.equal('::')
|
||||
})
|
||||
});
|
||||
|
||||
after(stopMaxScale)
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user