@@ -516,6 +516,38 @@ 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
+ options = addition_app .options .copy ()
524
+ options .host ["max_multiplexing" ] = 30
525
+ kwargs = dict (
526
+ func = addition_app .func ,
527
+ options = options ,
528
+ application_name = app_alias ,
529
+ application_auth_mode = "private" ,
530
+ )
531
+
532
+ app_revision = addition_app .host .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
+ app_revision = addition_app .host .register (** kwargs , scale = True )
542
+
543
+ with host ._connection as client :
544
+ res = client .list_aliases ()
545
+ found = next (filter (lambda alias : alias .alias == app_alias , res ), None )
546
+ assert found , f"Could not find app { app_alias } in { res } "
547
+ assert found .revision == app_revision
548
+ assert found .max_multiplexing == 30
549
+
550
+
519
551
def test_app_update_app (aliased_app : tuple [str , str ]):
520
552
app_revision , app_alias = aliased_app
521
553
0 commit comments