@@ -190,6 +190,57 @@ describe("wrangler", () => {
190190 └─┴─┴─┴─┴─┴─┘"
191191 ` ) ;
192192 } ) ;
193+
194+ it ( "should list queues' jurisdictions, if present" , async ( {
195+ expect,
196+ } ) => {
197+ const expectedQueues : QueueResponse [ ] = [
198+ {
199+ queue_id : "5e1b9969eb974d8c99c48d19df104c7a" ,
200+ queue_name : "queue-1" ,
201+ created_on : "01-01-2001" ,
202+ modified_on : "01-01-2001" ,
203+ producers : [ ] ,
204+ producers_total_count : 0 ,
205+ consumers : [ ] ,
206+ consumers_total_count : 0 ,
207+ settings : {
208+ delivery_delay : 0 ,
209+ } ,
210+ } ,
211+ {
212+ queue_id : "def19fa3787741579c9088eb850474af" ,
213+ queue_name : "queue-2" ,
214+ jurisdiction : "eu" ,
215+ created_on : "01-01-2001" ,
216+ modified_on : "01-01-2001" ,
217+ producers : [ ] ,
218+ producers_total_count : 0 ,
219+ consumers : [ ] ,
220+ consumers_total_count : 0 ,
221+ settings : {
222+ delivery_delay : 0 ,
223+ } ,
224+ } ,
225+ ] ;
226+ const expectedPage = 1 ;
227+ mockListRequest ( expect , expectedQueues , expectedPage ) ;
228+ await runWrangler ( "queues list" ) ;
229+
230+ expect ( std . err ) . toMatchInlineSnapshot ( `""` ) ;
231+ expect ( std . out ) . toMatchInlineSnapshot ( `
232+ "
233+ ⛅️ wrangler x.x.x
234+ ──────────────────
235+ ┌─┬─┬─┬─┬─┬─┬─┐
236+ │ id │ name │ jurisdiction │ created_on │ modified_on │ producers │ consumers │
237+ ├─┼─┼─┼─┼─┼─┼─┤
238+ │ 5e1b9969eb974d8c99c48d19df104c7a │ queue-1 │ │ 01-01-2001 │ 01-01-2001 │ 0 │ 0 │
239+ ├─┼─┼─┼─┼─┼─┼─┤
240+ │ def19fa3787741579c9088eb850474af │ queue-2 │ eu │ 01-01-2001 │ 01-01-2001 │ 0 │ 0 │
241+ └─┴─┴─┴─┴─┴─┴─┘"
242+ ` ) ;
243+ } ) ;
193244 } ) ;
194245
195246 describe ( "create" , ( ) => {
@@ -257,6 +308,7 @@ describe("wrangler", () => {
257308 -v, --version Show version number [boolean]
258309
259310 OPTIONS
311+ --jurisdiction The jurisdiction of the queue [string] [choices: "eu", "us", "fedramp"]
260312 --delivery-delay-secs How long a published message should be delayed for, in seconds. Must be between 0 and 86400 [number]
261313 --message-retention-period-secs How long to retain a message in the queue, in seconds. Must be between 60 and 86400 if on free tier, otherwise must be between 60 and 1209600 [number]"
262314 ` ) ;
@@ -2475,6 +2527,31 @@ describe("wrangler", () => {
24752527 -v, --version Show version number [boolean]"
24762528 ` ) ;
24772529 } ) ;
2530+
2531+ it ( "should return queue info with jurisdiction, if present" , async ( {
2532+ expect,
2533+ } ) => {
2534+ mockGetQueueByNameRequest ( expectedQueueName , {
2535+ ...mockQueue ,
2536+ jurisdiction : "eu" ,
2537+ } ) ;
2538+ await runWrangler ( "queues info testQueue" ) ;
2539+ expect ( std . out ) . toMatchInlineSnapshot ( `
2540+ "
2541+ ⛅️ wrangler x.x.x
2542+ ──────────────────
2543+ Queue Name: testQueue
2544+ Queue ID: 1234567
2545+ Jurisdiction: eu
2546+ Created On: 2024-05-20T14:43:56.70498Z
2547+ Last Modified: 2024-07-19T14:43:56.70498Z
2548+ Number of Producers: 2
2549+ Producers: worker:test-producer1, worker:test-producer2
2550+ Number of Consumers: 1
2551+ Consumers: worker:test-consumer"
2552+ ` ) ;
2553+ } ) ;
2554+
24782555 it ( "should return queue info with worker producers when the queue has workers configured as producers" , async ( {
24792556 expect,
24802557 } ) => {
@@ -2494,6 +2571,7 @@ describe("wrangler", () => {
24942571 Consumers: worker:test-consumer"
24952572 ` ) ;
24962573 } ) ;
2574+
24972575 it ( 'should return "http consumer" and a curl command when the consumer type is http_pull' , async ( {
24982576 expect,
24992577 } ) => {
0 commit comments