Skip to content

Commit b11333d

Browse files
committed
rename
1 parent 82ec279 commit b11333d

8 files changed

+26
-27
lines changed

services/autoscaling/tests/unit/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ def mocked_ec2_instances_envs(
322322

323323

324324
@pytest.fixture
325-
def disable_dynamic_service_background_task(mocker: MockerFixture) -> None:
325+
def disable_autoscaling_background_task(mocker: MockerFixture) -> None:
326326
mocker.patch(
327327
"simcore_service_autoscaling.modules.auto_scaling_task.create_periodic_task",
328328
autospec=True,

services/autoscaling/tests/unit/test_modules_auto_scaling_computational.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def minimal_configuration(
8282
local_dask_scheduler_server_envs: EnvVarsDict,
8383
mocked_ec2_instances_envs: EnvVarsDict,
8484
disabled_rabbitmq: None,
85-
disable_dynamic_service_background_task: None,
85+
disable_autoscaling_background_task: None,
8686
disable_buffers_pool_background_task: None,
8787
mocked_redis_server: None,
8888
) -> None: ...

services/autoscaling/tests/unit/test_modules_auto_scaling_dynamic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def minimal_configuration(
201201
enabled_dynamic_mode: EnvVarsDict,
202202
mocked_ec2_instances_envs: EnvVarsDict,
203203
disabled_rabbitmq: None,
204-
disable_dynamic_service_background_task: None,
204+
disable_autoscaling_background_task: None,
205205
disable_buffers_pool_background_task: None,
206206
mocked_redis_server: None,
207207
) -> None: ...
@@ -1075,7 +1075,7 @@ async def test_cluster_scaling_up_and_down_against_aws(
10751075
app_with_docker_join_drained: EnvVarsDict,
10761076
docker_swarm: None,
10771077
disabled_rabbitmq: None,
1078-
disable_dynamic_service_background_task: None,
1078+
disable_autoscaling_background_task: None,
10791079
disable_buffers_pool_background_task: None,
10801080
mocked_redis_server: None,
10811081
external_envfile_dict: EnvVarsDict,

services/autoscaling/tests/unit/test_modules_buffer_machine_core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def with_ec2_instance_allowed_types_env(
5959
@pytest.fixture
6060
def minimal_configuration(
6161
disabled_rabbitmq: None,
62-
disable_dynamic_service_background_task: None,
62+
disable_autoscaling_background_task: None,
6363
disable_buffers_pool_background_task: None,
6464
enabled_dynamic_mode: EnvVarsDict,
6565
mocked_ec2_server_envs: EnvVarsDict,
@@ -509,7 +509,7 @@ async def test_monitor_buffer_machines_terminates_unneeded_pool(
509509

510510
@pytest.fixture
511511
def pre_pull_images(
512-
ec2_instances_allowed_types_with_only_1_buffered: dict[InstanceTypeType, Any]
512+
ec2_instances_allowed_types_with_only_1_buffered: dict[InstanceTypeType, Any],
513513
) -> list[DockerGenericTag]:
514514
allowed_ec2_types = ec2_instances_allowed_types_with_only_1_buffered
515515
allowed_ec2_types_with_pre_pull_images_defined = dict(
@@ -534,7 +534,7 @@ def pre_pull_images(
534534
async def test_monitor_buffer_machines_against_aws(
535535
skip_if_external_envfile_dict: None,
536536
disable_buffers_pool_background_task: None,
537-
disable_dynamic_service_background_task: None,
537+
disable_autoscaling_background_task: None,
538538
disabled_rabbitmq: None,
539539
mocked_redis_server: None,
540540
external_envfile_dict: EnvVarsDict,

services/autoscaling/tests/unit/test_modules_rabbitmq.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def test_rabbitmq_initializes(
106106

107107

108108
async def test_post_message(
109-
disable_dynamic_service_background_task,
109+
disable_autoscaling_background_task,
110110
enabled_rabbitmq: RabbitSettings,
111111
disabled_ec2: None,
112112
disabled_ssm: None,

services/autoscaling/tests/unit/test_utils_auto_scaling_core.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ async def test_associate_ec2_instances_with_nodes_with_no_correspondence(
8989
nodes = [node() for _ in range(10)]
9090
ec2_instances = [
9191
(
92-
fake_ec2_instance_data(aws_private_dns=f"ip-10-12-32-{n+1}.internal-data")
92+
fake_ec2_instance_data(aws_private_dns=f"ip-10-12-32-{n + 1}.internal-data")
9393
if valid_ec2_dns
9494
else fake_ec2_instance_data()
9595
)
@@ -113,7 +113,7 @@ async def test_associate_ec2_instances_with_corresponding_nodes(
113113
nodes = []
114114
ec2_instances = []
115115
for n in range(10):
116-
host_name = f"ip-10-12-32-{n+1}"
116+
host_name = f"ip-10-12-32-{n + 1}"
117117
nodes.append(node(Description={"Hostname": host_name}))
118118
ec2_instances.append(
119119
fake_ec2_instance_data(aws_private_dns=f"{host_name}.internal-data")
@@ -143,10 +143,9 @@ def minimal_configuration(
143143
disabled_rabbitmq: None,
144144
disabled_ec2: None,
145145
disabled_ssm: None,
146-
disable_dynamic_service_background_task: None,
146+
disable_autoscaling_background_task: None,
147147
mocked_redis_server: None,
148-
) -> None:
149-
...
148+
) -> None: ...
150149

151150

152151
@pytest.fixture
@@ -367,9 +366,9 @@ def test_sort_drained_nodes(
367366
fake_node = create_fake_node()
368367
assert fake_node.spec
369368
assert fake_node.spec.labels
370-
fake_node.spec.labels[
371-
_OSPARC_NODE_TERMINATION_PROCESS_LABEL_KEY
372-
] = arrow.utcnow().datetime.isoformat()
369+
fake_node.spec.labels[_OSPARC_NODE_TERMINATION_PROCESS_LABEL_KEY] = (
370+
arrow.utcnow().datetime.isoformat()
371+
)
373372
fake_associated_instance = create_associated_instance(
374373
fake_node,
375374
terminateable_time=False,

services/autoscaling/tests/unit/test_utils_docker.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ async def test_find_node_with_name_with_common_prefixed_nodes(
921921
mocked_aiodocker = mocker.patch.object(autoscaling_docker, "nodes", autospec=True)
922922
mocked_aiodocker.list.return_value = [
923923
create_fake_node(
924-
Description=NodeDescription(Hostname=f"{common_prefix}{'1'*(i+1)}")
924+
Description=NodeDescription(Hostname=f"{common_prefix}{'1' * (i + 1)}")
925925
)
926926
for i in range(3)
927927
]
@@ -941,7 +941,7 @@ async def test_find_node_with_smaller_name_with_common_prefixed_nodes_returns_no
941941
mocked_aiodocker = mocker.patch.object(autoscaling_docker, "nodes", autospec=True)
942942
mocked_aiodocker.list.return_value = [
943943
create_fake_node(
944-
Description=NodeDescription(Hostname=f"{common_prefix}{'1'*(i+1)}")
944+
Description=NodeDescription(Hostname=f"{common_prefix}{'1' * (i + 1)}")
945945
)
946946
for i in range(3)
947947
]
@@ -1022,7 +1022,7 @@ def test_get_new_node_docker_tags(
10221022
disabled_ssm: None,
10231023
mocked_redis_server: None,
10241024
enabled_dynamic_mode: EnvVarsDict,
1025-
disable_dynamic_service_background_task: None,
1025+
disable_autoscaling_background_task: None,
10261026
app_settings: ApplicationSettings,
10271027
fake_ec2_instance_data: Callable[..., EC2InstanceData],
10281028
):
@@ -1167,7 +1167,7 @@ async def test_set_node_osparc_ready(
11671167
disabled_ssm: None,
11681168
mocked_redis_server: None,
11691169
enabled_dynamic_mode: EnvVarsDict,
1170-
disable_dynamic_service_background_task: None,
1170+
disable_autoscaling_background_task: None,
11711171
app_settings: ApplicationSettings,
11721172
autoscaling_docker: AutoscalingDocker,
11731173
host_node: Node,
@@ -1210,7 +1210,7 @@ async def test_set_node_found_empty(
12101210
disabled_ssm: None,
12111211
mocked_redis_server: None,
12121212
enabled_dynamic_mode: EnvVarsDict,
1213-
disable_dynamic_service_background_task: None,
1213+
disable_autoscaling_background_task: None,
12141214
host_node: Node,
12151215
autoscaling_docker: AutoscalingDocker,
12161216
):
@@ -1254,7 +1254,7 @@ async def test_set_node_begin_termination_process(
12541254
disabled_ssm: None,
12551255
mocked_redis_server: None,
12561256
enabled_dynamic_mode: EnvVarsDict,
1257-
disable_dynamic_service_background_task: None,
1257+
disable_autoscaling_background_task: None,
12581258
host_node: Node,
12591259
autoscaling_docker: AutoscalingDocker,
12601260
):
@@ -1287,7 +1287,7 @@ async def test_attach_node(
12871287
disabled_ssm: None,
12881288
mocked_redis_server: None,
12891289
enabled_dynamic_mode: EnvVarsDict,
1290-
disable_dynamic_service_background_task: None,
1290+
disable_autoscaling_background_task: None,
12911291
app_settings: ApplicationSettings,
12921292
autoscaling_docker: AutoscalingDocker,
12931293
host_node: Node,

services/autoscaling/tests/unit/test_utils_rabbitmq.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050

5151
async def test_post_task_log_message(
52-
disable_dynamic_service_background_task,
52+
disable_autoscaling_background_task,
5353
enabled_rabbitmq: RabbitSettings,
5454
disabled_ec2: None,
5555
disabled_ssm: None,
@@ -112,7 +112,7 @@ async def test_post_task_log_message(
112112

113113

114114
async def test_post_task_log_message_does_not_raise_if_service_has_no_labels(
115-
disable_dynamic_service_background_task,
115+
disable_autoscaling_background_task,
116116
enabled_rabbitmq: RabbitSettings,
117117
disabled_ec2: None,
118118
disabled_ssm: None,
@@ -143,7 +143,7 @@ async def test_post_task_log_message_does_not_raise_if_service_has_no_labels(
143143

144144

145145
async def test_post_task_progress_message(
146-
disable_dynamic_service_background_task,
146+
disable_autoscaling_background_task,
147147
enabled_rabbitmq: RabbitSettings,
148148
disabled_ec2: None,
149149
disabled_ssm: None,
@@ -209,7 +209,7 @@ async def test_post_task_progress_message(
209209

210210

211211
async def test_post_task_progress_does_not_raise_if_service_has_no_labels(
212-
disable_dynamic_service_background_task,
212+
disable_autoscaling_background_task,
213213
enabled_rabbitmq: RabbitSettings,
214214
disabled_ec2: None,
215215
disabled_ssm: None,

0 commit comments

Comments
 (0)