enima2684 commented on a change in pull request #17474:
URL: https://github.com/apache/airflow/pull/17474#discussion_r689570502
##########
File path: tests/providers/docker/operators/test_docker_swarm.py
##########
@@ -66,22 +65,31 @@ def _client_service_logs_effect():
mem_limit='128m',
user='unittest',
task_id='unittest',
- mounts=[Mount(source='/host/path', target='/container/path',
type='bind')],
+ mounts=[types.Mount(source='/host/path', target='/container/path',
type='bind')],
auto_remove=True,
tty=True,
+ configs=[types.ConfigReference(config_id="dummy_cfg_id",
config_name="dummy_cfg_name")],
+ secrets=[types.SecretReference(secret_id="dummy_secret_id",
secret_name="dummy_secret_name")],
+ mode=types.ServiceMode(mode="replicated", replicas=3),
+ networks=["dummy_network"],
)
operator.execute(None)
types_mock.TaskTemplate.assert_called_once_with(
- container_spec=mock_obj, restart_policy=mock_obj,
resources=mock_obj
+ container_spec=mock_obj,
+ restart_policy=mock_obj,
+ resources=mock_obj,
+ networks=["dummy_network"],
)
types_mock.ContainerSpec.assert_called_once_with(
image='ubuntu:latest',
command='env',
user='unittest',
- mounts=[Mount(source='/host/path', target='/container/path',
type='bind')],
+ mounts=[types.Mount(source='/host/path', target='/container/path',
type='bind')],
tty=True,
env={'UNIT': 'TEST', 'AIRFLOW_TMP_DIR': '/tmp/airflow'},
+ configs=[types.ConfigReference(config_id="dummy_cfg_id",
config_name="dummy_cfg_name")],
+ secrets=[types.SecretReference(secret_id="dummy_secret_id",
secret_name="dummy_secret_name")],
Review comment:
Thanks for that ! I struggled initially to do it but thanks to your
comment, I was able to do it finally :)
It is done !
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]