@@ -80,7 +80,7 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:
80
80
async with ops_test .fast_forward ():
81
81
await ops_test .model .deploy (
82
82
charm ,
83
- num_units = 3 ,
83
+ num_units = 1 ,
84
84
series = CHARM_SERIES ,
85
85
storage = {"pgdata" : {"pool" : "lxd-btrfs" , "size" : 2048 }},
86
86
config = {"profile" : "testing" },
@@ -617,14 +617,19 @@ async def test_deploy_zero_units(ops_test: OpsTest, charm):
617
617
await add_unit_with_storage (ops_test , app = app , storage = primary_storage )
618
618
await ops_test .model .wait_for_idle (apps = [APP_NAME , APPLICATION_NAME ], status = "active" , timeout = 1500 )
619
619
620
+ connection_string , _ = await get_db_connection (ops_test , dbname = dbname )
621
+ logger .info ("checking whether writes are increasing" )
622
+ await are_writes_increasing (ops_test )
623
+
624
+ logger .info ("check test database data" )
625
+ await validate_test_data (connection_string )
626
+
620
627
logger .info ("scaling database to tow unit using foreign cluster" )
621
628
new_unit = await add_unit_with_storage (ops_test , app = app , storage = second_storage , is_blocked = True )
622
629
623
630
logger .info (f"remove unit { new_unit .name } with storage from application { SECOND_APPLICATION } " )
624
631
await ops_test .model .destroy_units (new_unit .name )
625
632
626
- connection_string , _ = await get_db_connection (ops_test , dbname = dbname )
627
- logger .info ("checking whether writes are increasing" )
628
633
await are_writes_increasing (ops_test )
629
634
630
635
logger .info ("check test database data" )
0 commit comments