eladkal commented on pull request #14960:
URL: https://github.com/apache/airflow/pull/14960#issuecomment-811987579


   @akki  the failures are on docker swarm tests:
   ```
    ___________ TestDockerSwarmOperator.test_failed_service_raises_error 
___________
     
     self = 
<tests.providers.docker.operators.test_docker_swarm.TestDockerSwarmOperator 
testMethod=test_failed_service_raises_error>
     types_mock = <MagicMock name='types' id='140504999858416'>
     client_class_mock = <MagicMock name='APIClient' id='140504999859312'>
     
         @mock.patch('airflow.providers.docker.operators.docker.APIClient')
         @mock.patch('airflow.providers.docker.operators.docker_swarm.types')
         def test_failed_service_raises_error(self, types_mock, 
client_class_mock):
         
             mock_obj = mock.Mock()
         
             client_mock = mock.Mock(spec=APIClient)
             client_mock.create_service.return_value = {'ID': 'some_id'}
             client_mock.images.return_value = []
             client_mock.pull.return_value = [b'{"status":"pull log"}']
             client_mock.tasks.return_value = [{'Status': {'State': 'failed'}}]
             types_mock.TaskTemplate.return_value = mock_obj
             types_mock.ContainerSpec.return_value = mock_obj
             types_mock.RestartPolicy.return_value = mock_obj
             types_mock.Resources.return_value = mock_obj
         
             client_class_mock.return_value = client_mock
         
             operator = DockerSwarmOperator(image='', auto_remove=False, 
task_id='unittest', enable_logging=False)
             msg = "Service failed: {'ID': 'some_id'}"
             with pytest.raises(AirflowException) as ctx:
                 operator.execute(None)
     >       assert str(ctx.value) == msg
     E       AssertionError: assert "Service did ...': 'some_id'}" == "Service 
fail...': 'some_id'}"
     E         - Service failed: {'ID': 'some_id'}
     E         ?         ^^   ^
     E         + Service did not complete: {'ID': 'some_id'}
     E         ?         ^ ++++++++++  ^^
   
     tests/providers/docker/operators/test_docker_swarm.py:171: AssertionError
     ```


-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to