@@ -15,7 +15,7 @@ describe('COMMAND', () => {
1515 const testCases = [
1616 {
1717 name : 'without policies' ,
18- input : [ 'ping' , - 1 , [ CommandFlags . STALE ] , 0 , 0 , 0 , [ CommandCategories . FAST ] , [ ] , [ ] ] satisfies CommandRawReply ,
18+ input : [ 'ping' , - 1 , [ CommandFlags . STALE ] , 0 , 0 , 0 , [ CommandCategories . FAST ] , [ ] , [ ] , [ ] ] satisfies CommandRawReply ,
1919 expected : {
2020 name : 'ping' ,
2121 arity : - 1 ,
@@ -25,12 +25,13 @@ describe('COMMAND', () => {
2525 step : 0 ,
2626 categories : new Set ( [ CommandCategories . FAST ] ) ,
2727 policies : { request : undefined , response : undefined } ,
28- isKeyless : true
28+ isKeyless : true ,
29+ subcommands : [ ]
2930 }
3031 } ,
3132 {
3233 name : 'with valid policies' ,
33- input : [ 'dbsize' , 1 , [ ] , 0 , 0 , 0 , [ ] , [ 'request_policy:all_shards' , 'response_policy:agg_sum' ] , [ ] ] satisfies CommandRawReply ,
34+ input : [ 'dbsize' , 1 , [ ] , 0 , 0 , 0 , [ ] , [ 'request_policy:all_shards' , 'response_policy:agg_sum' ] , [ ] , [ ] ] satisfies CommandRawReply ,
3435 expected : {
3536 name : 'dbsize' ,
3637 arity : 1 ,
@@ -40,12 +41,13 @@ describe('COMMAND', () => {
4041 step : 0 ,
4142 categories : new Set ( [ ] ) ,
4243 policies : { request : 'all_shards' , response : 'agg_sum' } ,
43- isKeyless : true
44+ isKeyless : true ,
45+ subcommands : [ ]
4446 }
4547 } ,
4648 {
4749 name : 'with invalid policies' ,
48- input : [ 'test' , 0 , [ ] , 0 , 0 , 0 , [ ] , [ 'request_policy:invalid' , 'response_policy:invalid' ] , [ 'some key specification' ] ] satisfies CommandRawReply ,
50+ input : [ 'test' , 0 , [ ] , 0 , 0 , 0 , [ ] , [ 'request_policy:invalid' , 'response_policy:invalid' ] , [ 'some key specification' ] , [ ] ] satisfies CommandRawReply ,
4951 expected : {
5052 name : 'test' ,
5153 arity : 0 ,
@@ -55,12 +57,13 @@ describe('COMMAND', () => {
5557 step : 0 ,
5658 categories : new Set ( [ ] ) ,
5759 policies : { request : undefined , response : undefined } ,
58- isKeyless : false
60+ isKeyless : false ,
61+ subcommands : [ ]
5962 }
6063 } ,
6164 {
6265 name : 'with request policy only' ,
63- input : [ 'test' , 0 , [ ] , 0 , 0 , 0 , [ ] , [ 'request_policy:all_nodes' ] , [ 'some key specification' ] ] satisfies CommandRawReply ,
66+ input : [ 'test' , 0 , [ ] , 0 , 0 , 0 , [ ] , [ 'request_policy:all_nodes' ] , [ 'some key specification' ] , [ ] ] satisfies CommandRawReply ,
6467 expected : {
6568 name : 'test' ,
6669 arity : 0 ,
@@ -70,12 +73,13 @@ describe('COMMAND', () => {
7073 step : 0 ,
7174 categories : new Set ( [ ] ) ,
7275 policies : { request : 'all_nodes' , response : undefined } ,
73- isKeyless : false
76+ isKeyless : false ,
77+ subcommands : [ ]
7478 }
7579 } ,
7680 {
7781 name : 'with response policy only' ,
78- input : [ 'test' , 0 , [ ] , 0 , 0 , 0 , [ ] , [ '' , 'response_policy:agg_max' ] , [ ] ] satisfies CommandRawReply ,
82+ input : [ 'test' , 0 , [ ] , 0 , 0 , 0 , [ ] , [ '' , 'response_policy:agg_max' ] , [ ] , [ ] ] satisfies CommandRawReply ,
7983 expected : {
8084 name : 'test' ,
8185 arity : 0 ,
@@ -85,12 +89,13 @@ describe('COMMAND', () => {
8589 step : 0 ,
8690 categories : new Set ( [ ] ) ,
8791 policies : { request : undefined , response : 'agg_max' } ,
88- isKeyless : true
92+ isKeyless : true ,
93+ subcommands : [ ]
8994 }
9095 } ,
9196 {
9297 name : 'with response policy only' ,
93- input : [ 'test' , 0 , [ ] , 0 , 0 , 0 , [ ] , [ '' , 'response_policy:agg_max' ] , [ ] ] satisfies CommandRawReply ,
98+ input : [ 'test' , 0 , [ ] , 0 , 0 , 0 , [ ] , [ '' , 'response_policy:agg_max' ] , [ ] , [ ] ] satisfies CommandRawReply ,
9499 expected : {
95100 name : 'test' ,
96101 arity : 0 ,
@@ -100,7 +105,8 @@ describe('COMMAND', () => {
100105 step : 0 ,
101106 categories : new Set ( [ ] ) ,
102107 policies : { request : undefined , response : 'agg_max' } ,
103- isKeyless : true
108+ isKeyless : true ,
109+ subcommands : [ ]
104110 }
105111 }
106112 ] ;
0 commit comments