tirkarthi commented on issue #20453: URL: https://github.com/apache/airflow/issues/20453#issuecomment-1097977346
airbyte tests are fixed in https://github.com/apache/airflow/pull/22951 . There are still below instances on main. On fixing the assert calls it seems the tests are already broken. ``` rg '\.has_calls' tests/providers/google/cloud/transfers/test_calendar_to_gcs.py 126: mock_calendar_hook.return_value.get_values.has_calls(call) 129: mock_upload_data.has_calls(call) tests/providers/google/cloud/hooks/test_looker.py 65: mock_pdt_build_status.has_calls(calls) tests/providers/google/cloud/hooks/test_cloud_memorystore.py 112: mock_get_conn.return_value.get_instance.has_calls( 266: mock_get_conn.return_value.get_instance.has_calls( 503: mock_get_conn.return_value.get_instance.has_calls( ``` ``` pytest --tb=short tests/providers/google/cloud/hooks/test_cloud_memorystore.py tests/providers/google/cloud/hooks/test_looker.py tests/providers/google/cloud/transfers/test_calendar_to_gcs.py ================================ test session starts ================================= platform linux -- Python 3.7.13, pytest-6.2.5, py-1.11.0, pluggy-1.0.0 -- /usr/local/bin/python cachedir: .pytest_cache rootdir: /opt/airflow, configfile: pytest.ini plugins: flaky-3.7.0, forked-1.4.0, cov-3.0.0, anyio-3.5.0, requests-mock-1.9.3, instafail-0.4.2, timeouts-1.2.1, rerunfailures-9.1.1, xdist-2.5.0, httpx-0.20.0, asyncio-0.18.3 asyncio: mode=strict setup timeout: 0.0s, execution timeout: 0.0s, teardown timeout: 0.0s collected 29 items tests/providers/google/cloud/hooks/test_cloud_memorystore.py::TestCloudMemorystoreWithDefaultProjectIdHook::test_create_instance_when_exists PASSED [ 3%] tests/providers/google/cloud/hooks/test_cloud_memorystore.py::TestCloudMemorystoreWithDefaultProjectIdHook::test_create_instance_when_not_exists FAILED [ 6%] tests/providers/google/cloud/hooks/test_cloud_memorystore.py::TestCloudMemorystoreWithDefaultProjectIdHook::test_delete_instance PASSED [ 10%] tests/providers/google/cloud/hooks/test_cloud_memorystore.py::TestCloudMemorystoreWithDefaultProjectIdHook::test_get_instance PASSED [ 13%] tests/providers/google/cloud/hooks/test_cloud_memorystore.py::TestCloudMemorystoreWithDefaultProjectIdHook::test_list_instances PASSED [ 17%] tests/providers/google/cloud/hooks/test_cloud_memorystore.py::TestCloudMemorystoreWithDefaultProjectIdHook::test_update_instance PASSED [ 20%] tests/providers/google/cloud/hooks/test_cloud_memorystore.py::TestCloudMemorystoreWithoutDefaultProjectIdHook::test_create_instance_when_exists PASSED [ 24%] tests/providers/google/cloud/hooks/test_cloud_memorystore.py::TestCloudMemorystoreWithoutDefaultProjectIdHook::test_create_instance_when_not_exists FAILED [ 27%] tests/providers/google/cloud/hooks/test_cloud_memorystore.py::TestCloudMemorystoreWithoutDefaultProjectIdHook::test_create_instance_without_project_id PASSED [ 31%] tests/providers/google/cloud/hooks/test_cloud_memorystore.py::TestCloudMemorystoreWithoutDefaultProjectIdHook::test_delete_instance PASSED [ 34%] tests/providers/google/cloud/hooks/test_cloud_memorystore.py::TestCloudMemorystoreWithoutDefaultProjectIdHook::test_delete_instance_without_project_id PASSED [ 37%] tests/providers/google/cloud/hooks/test_cloud_memorystore.py::TestCloudMemorystoreWithoutDefaultProjectIdHook::test_get_instance PASSED [ 41%] tests/providers/google/cloud/hooks/test_cloud_memorystore.py::TestCloudMemorystoreWithoutDefaultProjectIdHook::test_get_instance_without_project_id PASSED [ 44%] tests/providers/google/cloud/hooks/test_cloud_memorystore.py::TestCloudMemorystoreWithoutDefaultProjectIdHook::test_list_instances PASSED [ 48%] tests/providers/google/cloud/hooks/test_cloud_memorystore.py::TestCloudMemorystoreWithoutDefaultProjectIdHook::test_list_instances_without_project_id PASSED [ 51%] tests/providers/google/cloud/hooks/test_cloud_memorystore.py::TestCloudMemorystoreWithoutDefaultProjectIdHook::test_update_instance PASSED [ 55%] tests/providers/google/cloud/hooks/test_cloud_memorystore.py::TestCloudMemorystoreWithoutDefaultProjectIdHook::test_update_instance_without_project_id PASSED [ 58%] tests/providers/google/cloud/hooks/test_cloud_memorystore.py::TestCloudMemorystoreMemcachedWithDefaultProjectIdHook::test_create_instance_when_exists PASSED [ 62%] tests/providers/google/cloud/hooks/test_cloud_memorystore.py::TestCloudMemorystoreMemcachedWithDefaultProjectIdHook::test_create_instance_when_not_exists FAILED [ 65%] tests/providers/google/cloud/hooks/test_cloud_memorystore.py::TestCloudMemorystoreMemcachedWithDefaultProjectIdHook::test_delete_instance PASSED [ 68%] tests/providers/google/cloud/hooks/test_cloud_memorystore.py::TestCloudMemorystoreMemcachedWithDefaultProjectIdHook::test_get_instance PASSED [ 72%] tests/providers/google/cloud/hooks/test_cloud_memorystore.py::TestCloudMemorystoreMemcachedWithDefaultProjectIdHook::test_list_instances PASSED [ 75%] tests/providers/google/cloud/hooks/test_cloud_memorystore.py::TestCloudMemorystoreMemcachedWithDefaultProjectIdHook::test_update_instance PASSED [ 79%] tests/providers/google/cloud/hooks/test_looker.py::TestLookerHook::test_check_pdt_build PASSED [ 82%] tests/providers/google/cloud/hooks/test_looker.py::TestLookerHook::test_start_pdt_build PASSED [ 86%] tests/providers/google/cloud/hooks/test_looker.py::TestLookerHook::test_stop_pdt_build PASSED [ 89%] tests/providers/google/cloud/hooks/test_looker.py::TestLookerHook::test_wait_for_job PASSED [ 93%] tests/providers/google/cloud/transfers/test_calendar_to_gcs.py::TestGoogleCalendarToGCSOperator::test_upload_data PASSED [ 96%] tests/providers/google/cloud/transfers/test_calendar_to_gcs.py::TestGoogleCalendarToGCSOperator::test_execute FAILED [100%] ====================================== FAILURES ====================================== _ TestCloudMemorystoreWithDefaultProjectIdHook.test_create_instance_when_not_exists __ tests/providers/google/cloud/hooks/test_cloud_memorystore.py:115: in test_create_instance_when_not_exists mock.call(name=TEST_NAME, retry=TEST_RETRY, timeout=TEST_TIMEOUT, metadata=TEST_METADATA), /usr/local/lib/python3.7/unittest/mock.py:917: in assert_has_calls ) from cause E AssertionError: Calls not found. E Expected: [call(metadata=[('KEY', 'VALUE')], name='projects/test-project-id/locations/test-location/instances/test-instance-id', retry=<_MethodDefault._DEFAULT_VALUE: <object object at 0x7f79ee42f360>>, timeout=10.0), E call(metadata=[('KEY', 'VALUE')], name='projects/test-project-id/locations/test-location/instances/test-instance-id', retry=<_MethodDefault._DEFAULT_VALUE: <object object at 0x7f79ee42f360>>, timeout=10.0)] E Actual: [call(metadata=[('KEY', 'VALUE')], request={'name': 'projects/example-project/locations/test-location/instances/test-instance-id'}, retry=<_MethodDefault._DEFAULT_VALUE: <object object at 0x7f79ee42f360>>, timeout=10.0), E call(metadata=[('KEY', 'VALUE')], request={'name': 'projects/example-project/locations/test-location/instances/test-instance-id'}, retry=<_MethodDefault._DEFAULT_VALUE: <object object at 0x7f79ee42f360>>, timeout=10.0)] -------------------------------- Captured stdout call -------------------------------- [2022-04-13 12:11:00,820] {cloud_memorystore.py:155} INFO - Fetching instance: projects/example-project/locations/test-location/instances/test-instance-id [2022-04-13 12:11:00,820] {cloud_memorystore.py:162} INFO - Instance not exists. [2022-04-13 12:11:00,820] {cloud_memorystore.py:173} INFO - Instance created. --------------------------------- Captured log call ---------------------------------- INFO airflow.providers.google.cloud.hooks.cloud_memorystore.CloudMemorystoreHook:cloud_memorystore.py:155 Fetching instance: projects/example-project/locations/test-location/instances/test-instance-id INFO airflow.providers.google.cloud.hooks.cloud_memorystore.CloudMemorystoreHook:cloud_memorystore.py:162 Instance not exists. INFO airflow.providers.google.cloud.hooks.cloud_memorystore.CloudMemorystoreHook:cloud_memorystore.py:173 Instance created. _ TestCloudMemorystoreWithoutDefaultProjectIdHook.test_create_instance_when_not_exists _ tests/providers/google/cloud/hooks/test_cloud_memorystore.py:278: in test_create_instance_when_not_exists metadata=TEST_METADATA, /usr/local/lib/python3.7/unittest/mock.py:917: in assert_has_calls ) from cause E AssertionError: Calls not found. E Expected: [call(metadata=[('KEY', 'VALUE')], name='projects/test-project-id/locations/test-location/instances/test-instance-id', retry=<_MethodDefault._DEFAULT_VALUE: <object object at 0x7f79ee42f360>>, timeout=10.0), E call(metadata=[('KEY', 'VALUE')], name='projects/test-project-id/locations/test-location/instances/test-instance-id', retry=<_MethodDefault._DEFAULT_VALUE: <object object at 0x7f79ee42f360>>, timeout=10.0)] E Actual: [call(metadata=[('KEY', 'VALUE')], request={'name': 'projects/test-project-id/locations/test-location/instances/test-instance-id'}, retry=<_MethodDefault._DEFAULT_VALUE: <object object at 0x7f79ee42f360>>, timeout=10.0), E call(metadata=[('KEY', 'VALUE')], request={'name': 'projects/test-project-id/locations/test-location/instances/test-instance-id'}, retry=<_MethodDefault._DEFAULT_VALUE: <object object at 0x7f79ee42f360>>, timeout=10.0)] -------------------------------- Captured stdout call -------------------------------- [2022-04-13 12:11:00,965] {cloud_memorystore.py:155} INFO - Fetching instance: projects/test-project-id/locations/test-location/instances/test-instance-id [2022-04-13 12:11:00,966] {cloud_memorystore.py:162} INFO - Instance not exists. [2022-04-13 12:11:00,966] {cloud_memorystore.py:173} INFO - Instance created. --------------------------------- Captured log call ---------------------------------- INFO airflow.providers.google.cloud.hooks.cloud_memorystore.CloudMemorystoreHook:cloud_memorystore.py:155 Fetching instance: projects/test-project-id/locations/test-location/instances/test-instance-id INFO airflow.providers.google.cloud.hooks.cloud_memorystore.CloudMemorystoreHook:cloud_memorystore.py:162 Instance not exists. INFO airflow.providers.google.cloud.hooks.cloud_memorystore.CloudMemorystoreHook:cloud_memorystore.py:173 Instance created. _ TestCloudMemorystoreMemcachedWithDefaultProjectIdHook.test_create_instance_when_not_exists _ tests/providers/google/cloud/hooks/test_cloud_memorystore.py:506: in test_create_instance_when_not_exists mock.call(name=TEST_NAME, retry=TEST_RETRY, timeout=TEST_TIMEOUT, metadata=TEST_METADATA), /usr/local/lib/python3.7/unittest/mock.py:917: in assert_has_calls ) from cause E AssertionError: Calls not found. E Expected: [call(metadata=[('KEY', 'VALUE')], name='projects/test-project-id/locations/test-location/instances/test-instance-id', retry=<_MethodDefault._DEFAULT_VALUE: <object object at 0x7f79ee42f360>>, timeout=10.0), E call(metadata=[('KEY', 'VALUE')], name='projects/test-project-id/locations/test-location/instances/test-instance-id', retry=<_MethodDefault._DEFAULT_VALUE: <object object at 0x7f79ee42f360>>, timeout=10.0)] E Actual: [call(metadata=[('KEY', 'VALUE')], name='projects/example-project/locations/test-location/instances/test-instance-id', retry=<_MethodDefault._DEFAULT_VALUE: <object object at 0x7f79ee42f360>>, timeout=10.0), E call(metadata=[('KEY', 'VALUE')], name='projects/example-project/locations/test-location/instances/test-instance-id', retry=<_MethodDefault._DEFAULT_VALUE: <object object at 0x7f79ee42f360>>, timeout=10.0)] -------------------------------- Captured stdout call -------------------------------- [2022-04-13 12:11:01,047] {cloud_memorystore.py:641} INFO - Instance not exists. [2022-04-13 12:11:01,047] {cloud_memorystore.py:659} INFO - Instance created. --------------------------------- Captured log call ---------------------------------- INFO airflow.providers.google.cloud.hooks.cloud_memorystore.CloudMemorystoreMemcachedHook:cloud_memorystore.py:641 Instance not exists. INFO airflow.providers.google.cloud.hooks.cloud_memorystore.CloudMemorystoreMemcachedHook:cloud_memorystore.py:659 Instance created. ____________________ TestGoogleCalendarToGCSOperator.test_execute ____________________ tests/providers/google/cloud/transfers/test_calendar_to_gcs.py:126: in test_execute mock_calendar_hook.return_value.get_values.assert_has_calls(call) /usr/local/lib/python3.7/unittest/mock.py:917: in assert_has_calls ) from cause E AssertionError: Calls not found. E Expected: ['', E (), E {'calendar_id': '1234567890', E 'iCalUID': None, E 'maxAttendees': None, E 'maxResults': None, E 'orderBy': None, E 'pageToken': None, E 'privateExtendedProperty': None, E 'q': None, E 'sharedExtendedProperty': None, E 'showDeleted': False, E 'showHiddenInvitations': False, E 'singleEvents': False, E 'syncToken': None, E 'timeMax': None, E 'timeMin': None, E 'timeZone': None, E 'updatedMin': None}] E Actual: [] ================================== warnings summary ================================== airflow/configuration.py:412 /opt/airflow/airflow/configuration.py:412: FutureWarning: The 'dag_default_view' setting in [webserver] has the old default value of 'tree'. This value has been changed to 'grid' in the running config, but please update your config before Apache Airflow 3.0. FutureWarning, airflow/configuration.py:412 /opt/airflow/airflow/configuration.py:412: FutureWarning: The 'log_filename_template' setting in [logging] has the old default value of '{{ ti.dag_id }}/{{ ti.task_id }}/{{ ts }}/{{ try_number }}.log'. This value has been changed to 'dag_id={{ ti.dag_id }}/run_id={{ ti.run_id }}/task_id={{ ti.task_id }}/{%% if ti.map_index >= 0 %%}map_index={{ ti.map_index }}/{%% endif %%}attempt={{ try_number }}.log' in the running config, but please update your config before Apache Airflow 3.0. FutureWarning, -- Docs: https://docs.pytest.org/en/stable/warnings.html ============================== short test summary info =============================== FAILED tests/providers/google/cloud/hooks/test_cloud_memorystore.py::TestCloudMemorystoreWithDefaultProjectIdHook::test_create_instance_when_not_exists FAILED tests/providers/google/cloud/hooks/test_cloud_memorystore.py::TestCloudMemorystoreWithoutDefaultProjectIdHook::test_create_instance_when_not_exists FAILED tests/providers/google/cloud/hooks/test_cloud_memorystore.py::TestCloudMemorystoreMemcachedWithDefaultProjectIdHook::test_create_instance_when_not_exists FAILED tests/providers/google/cloud/transfers/test_calendar_to_gcs.py::TestGoogleCalendarToGCSOperator::test_execute ====================== 4 failed, 25 passed, 2 warnings in 1.86s ====================== ``` -- 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]
