@@ -516,6 +516,39 @@ def test_404_response(test_app: str, request: pytest.FixtureRequest):
516
516
apps .run (test_app , path = "/other" , arguments = {"lhs" : 1 , "rhs" : 2 })
517
517
518
518
519
+ def test_app_deploy_scale (aliased_app : tuple [str , str ]):
520
+ app_revision , app_alias = aliased_app
521
+
522
+ host : api .FalServerlessHost = addition_app .host # type: ignore
523
+ kwargs = dict (
524
+ func = addition_app .func ,
525
+ options = addition_app .options ,
526
+ application_name = app_alias ,
527
+ application_auth_mode = "private" ,
528
+ max_multiplexing = 30 ,
529
+ )
530
+
531
+ with host ._connection as client :
532
+ app_revision = client .register (** kwargs , scale = False )
533
+
534
+ with host ._connection as client :
535
+ res = client .list_aliases ()
536
+ found = next (filter (lambda alias : alias .alias == app_alias , res ), None )
537
+ assert found , f"Could not find app { app_alias } in { res } "
538
+ assert found .revision == app_revision
539
+ assert found .max_multiplexing == 1
540
+
541
+ with host ._connection as client :
542
+ app_revision = client .register (** kwargs , scale = True )
543
+
544
+ with host ._connection as client :
545
+ res = client .list_aliases ()
546
+ found = next (filter (lambda alias : alias .alias == app_alias , res ), None )
547
+ assert found , f"Could not find app { app_alias } in { res } "
548
+ assert found .revision == app_revision
549
+ assert found .max_multiplexing == 30
550
+
551
+
519
552
def test_app_update_app (aliased_app : tuple [str , str ]):
520
553
app_revision , app_alias = aliased_app
521
554
0 commit comments