File tree Expand file tree Collapse file tree 2 files changed +9
-11
lines changed Expand file tree Collapse file tree 2 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,6 @@ describe('Cynosdb', () => {
9898 connection : {
9999 ip : expect . any ( String ) ,
100100 port : 3306 ,
101- readList : expect . any ( Array ) ,
102101 } ,
103102 } ) ;
104103
@@ -123,7 +122,6 @@ describe('Cynosdb', () => {
123122 connection : {
124123 ip : expect . any ( String ) ,
125124 port : 3306 ,
126- readList : expect . any ( Array ) ,
127125 } ,
128126 publicConnection : {
129127 domain : expect . any ( String ) ,
@@ -150,7 +148,6 @@ describe('Cynosdb', () => {
150148 connection : {
151149 ip : expect . any ( String ) ,
152150 port : 3306 ,
153- readList : expect . any ( Array ) ,
154151 } ,
155152 } ) ;
156153 inputs . clusterId = undefined ;
Original file line number Diff line number Diff line change @@ -42,18 +42,19 @@ function isSupportZone(zone, isServerless = false) {
4242}
4343
4444function formatConnectOutput ( detail ) {
45- const RoAddr = detail . RoAddr || [ ] ;
46- const readList = RoAddr . map ( ( item ) => {
47- return {
48- ip : item . IP ,
49- port : item . Port ,
50- } ;
51- } ) ;
5245 const info = {
5346 ip : detail . Vip ,
5447 port : detail . Vport ,
55- readList : readList ,
5648 } ;
49+ if ( detail . DbMode !== 'SERVERLESS' ) {
50+ const RoAddr = detail . RoAddr || [ ] ;
51+ info . readList = RoAddr . map ( ( item ) => {
52+ return {
53+ ip : item . IP ,
54+ port : item . Port ,
55+ } ;
56+ } ) ;
57+ }
5758
5859 return info ;
5960}
You can’t perform that action at this time.
0 commit comments