@@ -1808,6 +1808,8 @@ async def test_warm_buffers_are_started_to_replace_missing_hot_buffers(
18081808 ],
18091809 spied_cluster_analysis : MockType ,
18101810 instance_type_filters : Sequence [FilterTypeDef ],
1811+ mock_find_node_with_name_returns_fake_node : mock .Mock ,
1812+ mock_docker_tag_node : mock .Mock ,
18111813):
18121814 # pre-requisites
18131815 assert app_settings .AUTOSCALING_EC2_INSTANCES
@@ -1849,6 +1851,7 @@ async def test_warm_buffers_are_started_to_replace_missing_hot_buffers(
18491851 await auto_scale_cluster (
18501852 app = initialized_app , auto_scaling_mode = DynamicAutoscaling ()
18511853 )
1854+ mock_docker_tag_node .assert_not_called ()
18521855 # at analysis time, we had no machines running
18531856 analyzed_cluster = assert_cluster_state (
18541857 spied_cluster_analysis ,
@@ -1875,10 +1878,15 @@ async def test_warm_buffers_are_started_to_replace_missing_hot_buffers(
18751878 instance_filters = instance_type_filters ,
18761879 )
18771880
1878- # let's autoscale again, to check the cluster analysis
1881+ # let's autoscale again, to check the cluster analysis and tag the nodes
18791882 await auto_scale_cluster (
18801883 app = initialized_app , auto_scaling_mode = DynamicAutoscaling ()
18811884 )
1885+ mock_docker_tag_node .assert_called ()
1886+ assert (
1887+ mock_docker_tag_node .call_count
1888+ == app_settings .AUTOSCALING_EC2_INSTANCES .EC2_INSTANCES_MACHINES_BUFFER
1889+ )
18821890 # at analysis time, we had no machines running
18831891 analyzed_cluster = assert_cluster_state (
18841892 spied_cluster_analysis ,
0 commit comments