Skip to content

Commit cdd42b4

Browse files
committed
rename
1 parent 8baf570 commit cdd42b4

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

services/autoscaling/tests/unit/test_modules_cluster_scaling_buffer_machine_core.py renamed to services/autoscaling/tests/unit/test_modules_cluster_scaling_warm_buffer_machine_core.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
from pytest_simcore.helpers.logging_tools import log_context
2929
from pytest_simcore.helpers.monkeypatch_envs import EnvVarsDict, setenvs_from_dict
3030
from simcore_service_autoscaling.constants import PRE_PULLED_IMAGES_EC2_TAG_KEY
31-
from simcore_service_autoscaling.modules.cluster_scaling._warm_buffer_machines_pool_core import (
32-
monitor_buffer_machines,
33-
)
3431
from simcore_service_autoscaling.modules.cluster_scaling._provider_dynamic import (
3532
DynamicAutoscalingProvider,
3633
)
34+
from simcore_service_autoscaling.modules.cluster_scaling._warm_buffer_machines_pool_core import (
35+
monitor_buffer_machines,
36+
)
3737
from types_aiobotocore_ec2 import EC2Client
3838
from types_aiobotocore_ec2.literals import InstanceStateNameType, InstanceTypeType
3939
from types_aiobotocore_ec2.type_defs import FilterTypeDef
@@ -161,9 +161,9 @@ async def _test_monitor_buffer_machines(
161161
):
162162
# 0. we have no instances now
163163
all_instances = await ec2_client.describe_instances(Filters=instance_type_filters)
164-
assert not all_instances["Reservations"], (
165-
f"There should be no instances at the start of the test. Found following instance ids: {[i['InstanceId'] for r in all_instances['Reservations'] if 'Instances' in r for i in r['Instances'] if 'InstanceId' in i]}"
166-
)
164+
assert not all_instances[
165+
"Reservations"
166+
], f"There should be no instances at the start of the test. Found following instance ids: {[i['InstanceId'] for r in all_instances['Reservations'] if 'Instances' in r for i in r['Instances'] if 'InstanceId' in i]}"
167167

168168
# 1. run, this will create as many buffer machines as needed
169169
with log_context(logging.INFO, "create buffer machines"):
@@ -388,9 +388,9 @@ async def test_monitor_buffer_machines_terminates_instances_with_incorrect_pre_p
388388
],
389389
):
390390
# have machines of correct type with missing pre-pulled images
391-
assert len(pre_pull_images) > 1, (
392-
"this test relies on pre-pulled images being filled with more than 1 image"
393-
)
391+
assert (
392+
len(pre_pull_images) > 1
393+
), "this test relies on pre-pulled images being filled with more than 1 image"
394394
buffer_machines = await create_buffer_machines(
395395
buffer_count + 5,
396396
next(iter(list(ec2_instances_allowed_types_with_only_1_buffered))),
@@ -520,9 +520,9 @@ def pre_pull_images(
520520
allowed_ec2_types.items(),
521521
)
522522
)
523-
assert len(allowed_ec2_types_with_pre_pull_images_defined) <= 1, (
524-
"more than one type with pre-pulled-images is disallowed in this test!"
525-
)
523+
assert (
524+
len(allowed_ec2_types_with_pre_pull_images_defined) <= 1
525+
), "more than one type with pre-pulled-images is disallowed in this test!"
526526

527527
if allowed_ec2_types_with_pre_pull_images_defined:
528528
return next(

0 commit comments

Comments
 (0)