Skip to content

Test error Debian sid #1624

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
avalentino opened this issue Apr 21, 2025 · 2 comments
Open

Test error Debian sid #1624

avalentino opened this issue Apr 21, 2025 · 2 comments

Comments

@avalentino
Copy link
Contributor

I'm trying to package eodag for debian.
Once done I would like to have the debian package for eodag published as part fo the official Debian archive.
I hope that this is OK for the eodag developers.

As part of the procedure to create debian package the SW is built and tested in and environment that does not have access to the interned.
In such environment I the execution of the unittest suite fails with a very large number of errors.
In particular, all tests in the following files fail:

tests/integration/test_core_search.py
tests/integration/test_download_auth.py
tests/integration/test_search_stac_static.py
tests/test_end_to_end.py
tests/test_requirements.py
tests/units/test_download_plugins.py
tests/units/test_http_server.py
tests/units/test_stac_core.py

Moreover the following additional tests fail:

$ python3.13 -m pytest --ignore=/build/eodag-3.3.1+ds/tests/integration/test_core_search.py --ignore=/build/eodag-3.3.1+ds/tests/integration/test_download_auth.py --ignore=/build/eodag-3.3.1+ds/tests/integration/test_search_stac_static.py --ignore=/build/eodag-3.3.1+ds/tests/test_end_to_end.py --ignore=/build/eodag-3.3.1+ds/tests/test_requirements.py --ignore=/build/eodag-3.3.1+ds/tests/units/test_download_plugins.py --ignore=/build/eodag-3.3.1+ds/tests/units/test_http_server.py --ignore=/build/eodag-3.3.1+ds/tests/units/test_stac_core.py /build/eodag-3.3.1+ds/tests
============================= test session starts ==============================
platform linux -- Python 3.13.3, pytest-8.3.5, pluggy-1.5.0
rootdir: /build/eodag-3.3.1+ds
configfile: pytest.ini
plugins: typeguard-4.4.2, instafail-0.5.0, socket-0.7.0, Faker-33.3.1, anyio-4.8.0, xdist-3.6.1
collected 434 items

../../../tests/integration/test_config_ext_plugin.py .                   [  0%]
../../../tests/integration/test_core_config.py ..F..                     [  1%]
../../../tests/integration/test_core_search_results.py .FFF.FF..         [  3%]
../../../tests/test_cli.py F..F..FF..FFFF...................             [ 11%]
../../../tests/test_config.py ............F                              [ 14%]
../../../tests/units/test_apis_plugins.py .FF....FFFF                    [ 16%]
../../../tests/units/test_auth_plugins.py .........................EEEEE [ 23%]
..................                                                       [ 27%]
../../../tests/units/test_core.py F....FFFFFFF.FFFF.FFFFFFF.FF.F..FFFF.F [ 36%]
.FFFFFF........F..F...FFFFFF.FFFFFFFFFF..sF.FsF....FF.F.....EEEEE        [ 51%]
../../../tests/units/test_eoproduct.py .......F............              [ 55%]
../../../tests/units/test_eoproduct_driver_generic.py ..                 [ 56%]
../../../tests/units/test_eoproduct_driver_sentinel1.py ..               [ 56%]
../../../tests/units/test_eoproduct_driver_sentinel2.py ..               [ 57%]
../../../tests/units/test_metadata_mapping.py .......................... [ 63%]
..............                                                           [ 66%]
../../../tests/units/test_safe_build.py .....                            [ 67%]
../../../tests/units/test_search_plugins.py ...FFFFFFFFFF.........FFFFFF [ 74%]
F........FFFFFFFF.................                                       [ 82%]
../../../tests/units/test_search_result.py .........                     [ 84%]
../../../tests/units/test_search_types.py ..                             [ 84%]
../../../tests/units/test_stac_reader.py ....s.                          [ 85%]
../../../tests/units/test_stac_types.py ....................             [ 90%]
../../../tests/units/test_stac_utils.py EEEEEEEEEEE........              [ 94%]
../../../tests/units/test_utils.py ..F.............                      [ 98%]
../../../tests/units/test_utils_exceptions.py .                          [ 98%]
../../../tests/units/test_utils_s3.py .....                              [100%]

==================================== ERRORS ====================================

[...]

=========================== short test summary info ============================
FAILED ../../../tests/integration/test_core_config.py::TestCoreProvidersConfig::test_core_providers_config_update
FAILED ../../../tests/integration/test_core_search_results.py::TestCoreSearchResults::test_core_search_results_registered
FAILED ../../../tests/integration/test_core_search_results.py::TestCoreSearchResults::test_core_search_with_count
FAILED ../../../tests/integration/test_core_search_results.py::TestCoreSearchResults::test_core_search_with_provider
FAILED ../../../tests/integration/test_core_search_results.py::TestCoreSearchResults::test_download_all_callback
FAILED ../../../tests/integration/test_core_search_results.py::TestCoreSearchResults::test_download_all_callback_and_skipped
FAILED ../../../tests/test_cli.py::TestEodagCli::test_eodag_cli_version - Ass...
FAILED ../../../tests/test_cli.py::TestEodagCli::test_eodag_download_missingcredentials
FAILED ../../../tests/test_cli.py::TestEodagCli::test_eodag_download_quicklooks
FAILED ../../../tests/test_cli.py::TestEodagCli::test_eodag_download_wrongcredentials
FAILED ../../../tests/test_cli.py::TestEodagCli::test_eodag_list_product_type_fetch
FAILED ../../../tests/test_cli.py::TestEodagCli::test_eodag_list_product_type_ok
FAILED ../../../tests/test_cli.py::TestEodagCli::test_eodag_list_product_type_with_provider_ko
FAILED ../../../tests/test_cli.py::TestEodagCli::test_eodag_list_product_type_with_provider_ok
FAILED ../../../tests/test_config.py::TestStacProviderConfig::test_existing_stac_provider_conf
FAILED ../../../tests/units/test_apis_plugins.py::TestApisPluginEcmwfApi::test_plugins_apis_ecmwf_download
FAILED ../../../tests/units/test_apis_plugins.py::TestApisPluginEcmwfApi::test_plugins_apis_ecmwf_download_all
FAILED ../../../tests/units/test_apis_plugins.py::TestApisPluginUsgsApi::test_plugins_apis_usgs_authenticate
FAILED ../../../tests/units/test_apis_plugins.py::TestApisPluginUsgsApi::test_plugins_apis_usgs_download
FAILED ../../../tests/units/test_apis_plugins.py::TestApisPluginUsgsApi::test_plugins_apis_usgs_query
FAILED ../../../tests/units/test_apis_plugins.py::TestApisPluginUsgsApi::test_plugins_apis_usgs_query_by_id
FAILED ../../../tests/units/test_core.py::TestCore::test_available_sortables
FAILED ../../../tests/units/test_core.py::TestCore::test_discover_product_types
FAILED ../../../tests/units/test_core.py::TestCore::test_discover_product_types_with_api_plugin
FAILED ../../../tests/units/test_core.py::TestCore::test_discover_product_types_without_plugin
FAILED ../../../tests/units/test_core.py::TestCore::test_fetch_product_types_list
FAILED ../../../tests/units/test_core.py::TestCore::test_fetch_product_types_list_disabled
FAILED ../../../tests/units/test_core.py::TestCore::test_fetch_product_types_list_updated_system_conf
FAILED ../../../tests/units/test_core.py::TestCore::test_fetch_product_types_list_without_ext_conf
FAILED ../../../tests/units/test_core.py::TestCore::test_guess_product_type_with_filter
FAILED ../../../tests/units/test_core.py::TestCore::test_guess_product_type_with_mission_dates
FAILED ../../../tests/units/test_core.py::TestCore::test_list_product_types_fetch_providers
FAILED ../../../tests/units/test_core.py::TestCore::test_list_product_types_for_provider_ok
FAILED ../../../tests/units/test_core.py::TestCore::test_list_product_types_ok
FAILED ../../../tests/units/test_core.py::TestCore::test_list_queryables - eo...
FAILED ../../../tests/units/test_core.py::TestCore::test_list_queryables_additional
FAILED ../../../tests/units/test_core.py::TestCore::test_list_queryables_priority_sorted
FAILED ../../../tests/units/test_core.py::TestCore::test_list_queryables_with_constraints
FAILED ../../../tests/units/test_core.py::TestCore::test_prune_providers_list
FAILED ../../../tests/units/test_core.py::TestCore::test_prune_providers_list_for_search_without_auth
FAILED ../../../tests/units/test_core.py::TestCore::test_prune_providers_list_without_api_or_search_plugin
FAILED ../../../tests/units/test_core.py::TestCore::test_queryables_repr - eo...
FAILED ../../../tests/units/test_core.py::TestCore::test_set_preferred_provider
FAILED ../../../tests/units/test_core.py::TestCore::test_update_product_types_list
FAILED ../../../tests/units/test_core.py::TestCore::test_update_product_types_list_unknown_provider
FAILED ../../../tests/units/test_core.py::TestCore::test_update_product_types_list_with_api_plugin
FAILED ../../../tests/units/test_core.py::TestCore::test_update_product_types_list_without_plugin
FAILED ../../../tests/units/test_core.py::TestCoreConfWithEnvVar::test_core_object_prioritize_config_file_in_envvar
FAILED ../../../tests/units/test_core.py::TestCoreConfWithEnvVar::test_core_object_prioritize_providers_file_in_envvar
FAILED ../../../tests/units/test_core.py::TestCoreConfWithEnvVar::test_core_product_types_config_envvar
FAILED ../../../tests/units/test_core.py::TestCoreInvolvingConfDir::test_core_object_creates_config_standard_location
FAILED ../../../tests/units/test_core.py::TestCoreInvolvingConfDir::test_core_object_creates_index_if_not_exist
FAILED ../../../tests/units/test_core.py::TestCoreInvolvingConfDir::test_core_object_creates_locations_standard_location
FAILED ../../../tests/units/test_core.py::TestCoreInvolvingConfDir::test_read_only_home_dir
FAILED ../../../tests/units/test_core.py::TestCoreSearch::test__do_search_counts
FAILED ../../../tests/units/test_core.py::TestCoreSearch::test__do_search_paginated_handle_no_count_returned
FAILED ../../../tests/units/test_core.py::TestCoreSearch::test__do_search_support_itemsperpage_higher_than_maximum
FAILED ../../../tests/units/test_core.py::TestCoreSearch::test__do_search_without_count
FAILED ../../../tests/units/test_core.py::TestCoreSearch::test__prepare_search_dates
FAILED ../../../tests/units/test_core.py::TestCoreSearch::test__prepare_search_geom
FAILED ../../../tests/units/test_core.py::TestCoreSearch::test__prepare_search_locations
FAILED ../../../tests/units/test_core.py::TestCoreSearch::test__prepare_search_no_parameters
FAILED ../../../tests/units/test_core.py::TestCoreSearch::test__prepare_search_peps_plugins_product_available
FAILED ../../../tests/units/test_core.py::TestCoreSearch::test__prepare_search_peps_plugins_product_available_with_alias
FAILED ../../../tests/units/test_core.py::TestCoreSearch::test__prepare_search_peps_plugins_product_not_available
FAILED ../../../tests/units/test_core.py::TestCoreSearch::test__prepare_search_preserve_additional_kwargs
FAILED ../../../tests/units/test_core.py::TestCoreSearch::test__prepare_search_product_type_guess_it
FAILED ../../../tests/units/test_core.py::TestCoreSearch::test__prepare_search_product_type_provided
FAILED ../../../tests/units/test_core.py::TestCoreSearch::test__prepare_search_remove_guess_kwargs
FAILED ../../../tests/units/test_core.py::TestCoreSearch::test__prepare_search_search_plugin_has_generic_product_properties
FAILED ../../../tests/units/test_core.py::TestCoreSearch::test__prepare_search_search_plugin_has_known_product_properties
FAILED ../../../tests/units/test_core.py::TestCoreSearch::test__prepare_search_unknown_product_type
FAILED ../../../tests/units/test_core.py::TestCoreSearch::test_guess_product_type_with_kwargs
FAILED ../../../tests/units/test_core.py::TestCoreSearch::test_search_all_must_collect_them_all
FAILED ../../../tests/units/test_core.py::TestCoreSearch::test_search_all_unknown_product_type
FAILED ../../../tests/units/test_core.py::TestCoreSearch::test_search_iter_page_exhaust_get_all_pages_and_quit_early
FAILED ../../../tests/units/test_core.py::TestCoreSearch::test_search_iter_page_exhaust_get_all_pages_no_products_last_page
FAILED ../../../tests/units/test_core.py::TestCoreSearch::test_search_iter_page_returns_iterator
FAILED ../../../tests/units/test_eoproduct.py::TestEOProduct::test_eoproduct_download_progress_bar
FAILED ../../../tests/units/test_search_plugins.py::TestSearchPluginQueryStringSearch::test_plugins_search_querystringseach_timeout
FAILED ../../../tests/units/test_search_plugins.py::TestSearchPluginQueryStringSearch::test_plugins_search_querystringsearch_count_and_search_peps
FAILED ../../../tests/units/test_search_plugins.py::TestSearchPluginQueryStringSearch::test_plugins_search_querystringsearch_discover_product_types
FAILED ../../../tests/units/test_search_plugins.py::TestSearchPluginQueryStringSearch::test_plugins_search_querystringsearch_discover_product_types_keywords
FAILED ../../../tests/units/test_search_plugins.py::TestSearchPluginQueryStringSearch::test_plugins_search_querystringsearch_discover_product_types_paginated
FAILED ../../../tests/units/test_search_plugins.py::TestSearchPluginQueryStringSearch::test_plugins_search_querystringsearch_discover_product_types_post
FAILED ../../../tests/units/test_search_plugins.py::TestSearchPluginQueryStringSearch::test_plugins_search_querystringsearch_discover_product_types_with_query_param
FAILED ../../../tests/units/test_search_plugins.py::TestSearchPluginQueryStringSearch::test_plugins_search_querystringsearch_distinct_product_type_mtd_mapping
FAILED ../../../tests/units/test_search_plugins.py::TestSearchPluginQueryStringSearch::test_plugins_search_querystringsearch_no_count_and_search_peps
FAILED ../../../tests/units/test_search_plugins.py::TestSearchPluginQueryStringSearch::test_plugins_search_querystringsearch_search_cloudcover_peps
FAILED ../../../tests/units/test_search_plugins.py::TestSearchPluginODataV4Search::test_plugins_search_odatav4search_count_and_search_onda
FAILED ../../../tests/units/test_search_plugins.py::TestSearchPluginODataV4Search::test_plugins_search_odatav4search_count_and_search_onda_per_product_metadata_query
FAILED ../../../tests/units/test_search_plugins.py::TestSearchPluginODataV4Search::test_plugins_search_odatav4search_count_and_search_onda_per_product_metadata_query_request_error
FAILED ../../../tests/units/test_search_plugins.py::TestSearchPluginODataV4Search::test_plugins_search_odatav4search_distinct_product_type_mtd_mapping
FAILED ../../../tests/units/test_search_plugins.py::TestSearchPluginODataV4Search::test_plugins_search_odatav4search_normalize_results_onda
FAILED ../../../tests/units/test_search_plugins.py::TestSearchPluginODataV4Search::test_plugins_search_odatav4search_search_cloudcover_onda
FAILED ../../../tests/units/test_search_plugins.py::TestSearchPluginODataV4Search::test_plugins_search_odatav4search_with_ssl_context
FAILED ../../../tests/units/test_search_plugins.py::TestSearchPluginDataRequestSearch::test_plugins_check_request_status
FAILED ../../../tests/units/test_search_plugins.py::TestSearchPluginDataRequestSearch::test_plugins_create_data_request
FAILED ../../../tests/units/test_search_plugins.py::TestSearchPluginDataRequestSearch::test_plugins_get_result_data
FAILED ../../../tests/units/test_search_plugins.py::TestSearchPluginDataRequestSearch::test_plugins_get_result_data_ssl_verify_false
FAILED ../../../tests/units/test_search_plugins.py::TestSearchPluginDataRequestSearch::test_plugins_search_datareq_dates_required
FAILED ../../../tests/units/test_search_plugins.py::TestSearchPluginDataRequestSearch::test_plugins_search_datareq_distinct_product_type_mtd_mapping
FAILED ../../../tests/units/test_search_plugins.py::TestSearchPluginCreodiasS3Search::test_plugins_search_creodias_s3_client_error
FAILED ../../../tests/units/test_search_plugins.py::TestSearchPluginCreodiasS3Search::test_plugins_search_creodias_s3_links
FAILED ../../../tests/units/test_utils.py::TestUtils::test_fetch_json - pytes...
ERROR ../../../tests/units/test_auth_plugins.py::TestAuthPluginKeycloakOIDCPasswordAuth::test_plugins_auth_keycloak_authenticate
ERROR ../../../tests/units/test_auth_plugins.py::TestAuthPluginKeycloakOIDCPasswordAuth::test_plugins_auth_keycloak_authenticate_header
ERROR ../../../tests/units/test_auth_plugins.py::TestAuthPluginKeycloakOIDCPasswordAuth::test_plugins_auth_keycloak_authenticate_qs
ERROR ../../../tests/units/test_auth_plugins.py::TestAuthPluginKeycloakOIDCPasswordAuth::test_plugins_auth_keycloak_authenticate_use_refresh_token
ERROR ../../../tests/units/test_auth_plugins.py::TestAuthPluginKeycloakOIDCPasswordAuth::test_plugins_auth_keycloak_validate_credentials
ERROR ../../../tests/units/test_core.py::TestCoreProviderGroup::test_available_providers_by_group
ERROR ../../../tests/units/test_core.py::TestCoreProviderGroup::test_discover_product_types_grouped_providers
ERROR ../../../tests/units/test_core.py::TestCoreProviderGroup::test_fetch_product_types_list_grouped_providers
ERROR ../../../tests/units/test_core.py::TestCoreProviderGroup::test_get_search_plugins
ERROR ../../../tests/units/test_core.py::TestCoreProviderGroup::test_list_product_types
ERROR ../../../tests/units/test_stac_utils.py::TestStacUtils::test_fetch_external_stac_collections
ERROR ../../../tests/units/test_stac_utils.py::TestStacUtils::test_flatten_list
ERROR ../../../tests/units/test_stac_utils.py::TestStacUtils::test_get_date
ERROR ../../../tests/units/test_stac_utils.py::TestStacUtils::test_get_datetime
ERROR ../../../tests/units/test_stac_utils.py::TestStacUtils::test_get_next_link_get
ERROR ../../../tests/units/test_stac_utils.py::TestStacUtils::test_get_next_link_post
ERROR ../../../tests/units/test_stac_utils.py::TestStacUtils::test_is_dict_str_any
ERROR ../../../tests/units/test_stac_utils.py::TestStacUtils::test_list_to_str_list
ERROR ../../../tests/units/test_stac_utils.py::TestStacUtils::test_rfc3339_str_to_datetime
ERROR ../../../tests/units/test_stac_utils.py::TestStacUtils::test_str2json
ERROR ../../../tests/units/test_stac_utils.py::TestStacUtils::test_str2list
= 105 failed, 305 passed, 3 skipped, 25 warnings, 21 errors in 108.16s (0:01:48) =

Please find attached the full build log.

From what I cna say, some of the failures are clearly due to the impossibility to access the network.
In other case it seems more an issue with the management of plugins that could, maybe, be linked to the test environement.

I would like to kindly ask support to to identify tests that cannot be run in the debian build environemt and some help/hint to understand the reason of the errors in the remaining ones.

eodag-buildlog.txt

@sbrunato
Copy link
Collaborator

hello @avalentino ,

I would like to have the debian package for eodag published as part fo the official Debian archive.
I hope that this is OK for the eodag developers.

yes, sure

the execution of the unittest suite fails with a very large number of errors.

Looking at your attached logs, there are a lot of PluginNotFoundError that may mean that eodag is not properly installed before running tests. Please install eodag[dev] before running tests or use requirements-dev.txt, see Contributing guidelines.

@avalentino
Copy link
Contributor Author

avalentino commented Apr 23, 2025

Thanks @sbrunato
Since I'm trying to create a package for Debian (.deb) I cannot use pip install -r requirememts-dev.txt directly.
I have to use Debian packages for all the dependencies.

After applying the patch in PR #1631 the number of errors is drastically reduces:

python3.13 -m pytest --ignore=/build/eodag-3.3.1+ds/tests/test_end_to_end.py /build/eodag-3.3.1+ds/tests
============================= test session starts ==============================
platform linux -- Python 3.13.3, pytest-8.3.5, pluggy-1.5.0
rootdir: /build/eodag-3.3.1+ds
configfile: pytest.ini
plugins: typeguard-4.4.2, instafail-0.5.0, socket-0.7.0, Faker-33.3.1, anyio-4.8.0, xdist-3.6.1
collected 582 items

../../../tests/integration/test_config_ext_plugin.py .                   [  0%]
../../../tests/integration/test_core_config.py .....                     [  1%]
../../../tests/integration/test_core_search.py F..............           [  3%]
../../../tests/integration/test_core_search_results.py .........         [  5%]
../../../tests/integration/test_download_auth.py ...                     [  5%]
../../../tests/integration/test_search_stac_static.py ..............s    [  8%]
../../../tests/test_cli.py .................................             [ 13%]
../../../tests/test_config.py .............                              [ 16%]
../../../tests/test_requirements.py FF                                   [ 16%]
../../../tests/units/test_apis_plugins.py ...........                    [ 18%]
../../../tests/units/test_auth_plugins.py .............................. [ 23%]
..................                                                       [ 26%]
../../../tests/units/test_core.py ...................................... [ 33%]
...FFFF......................................s...................        [ 44%]
../../../tests/units/test_download_plugins.py .......................... [ 48%]
.......................                                                  [ 52%]
../../../tests/units/test_eoproduct.py .......F............              [ 56%]
../../../tests/units/test_eoproduct_driver_generic.py ..                 [ 56%]
../../../tests/units/test_eoproduct_driver_sentinel1.py ..               [ 56%]
../../../tests/units/test_eoproduct_driver_sentinel2.py ..               [ 57%]
../../../tests/units/test_http_server.py ............................... [ 62%]
............                                                             [ 64%]
../../../tests/units/test_metadata_mapping.py .......................... [ 69%]
..............                                                           [ 71%]
../../../tests/units/test_safe_build.py .....                            [ 72%]
../../../tests/units/test_search_plugins.py ............................ [ 77%]
..................................                                       [ 82%]
../../../tests/units/test_search_result.py .........                     [ 84%]
../../../tests/units/test_search_types.py ..                             [ 84%]
../../../tests/units/test_stac_core.py .....................             [ 88%]
../../../tests/units/test_stac_reader.py ....s.                          [ 89%]
../../../tests/units/test_stac_types.py ....................             [ 92%]
../../../tests/units/test_stac_utils.py ...................              [ 96%]
../../../tests/units/test_utils.py ..F.............                      [ 98%]
../../../tests/units/test_utils_exceptions.py .                          [ 99%]
../../../tests/units/test_utils_s3.py .....                              [100%]

=================================== FAILURES ===================================
________________ TestCoreSearch.test_core_search_auths_matching ________________

self = <tests.integration.test_core_search.TestCoreSearch testMethod=test_core_search_auths_matching>
mock_fetch_product_types_list = <function fetch_product_types_list at 0x77b0f15c45e0>
mock_query = <function query at 0x77b0e9868ae0>

    @mock.patch(
        "eodag.plugins.search.qssearch.StacSearch.query",
        autospec=True,
    )
    @mock.patch(
        "eodag.api.core.EODataAccessGateway.fetch_product_types_list", autospec=True
    )
    def test_core_search_auths_matching(
        self, mock_fetch_product_types_list, mock_query
    ):
        """Core search must set and use appropriate auth plugins"""
    
        self.dag.add_provider(
            "foo",
            "https://foo.bar/search",
            auth={
                "type": "GenericAuth",
                "matching_url": "https://foo.bar",
                "credentials": {"username": "a-username", "password": "a-password"},
            },
            search_auth={
                "type": "GenericAuth",
                "matching_conf": {"something": "special"},
                "credentials": {
                    "username": "another-username",
                    "password": "another-password",
                },
            },
            download_auth={
                "type": "GenericAuth",
                "matching_url": "https://somewhere",
                "credentials": {
                    "username": "yet-another-username",
                    "password": "yet-another-password",
                },
            },
        )
    
        # auth plugin without match configuration
        self.dag.add_provider(
            "provider_without_match_configured",
            "https://foo.bar/baz/search",
            search={"need_auth": True},
            auth={
                "type": "GenericAuth",
                "credentials": {
                    "username": "some-username",
                    "password": "some-password",
                },
            },
        )
>       self.dag.search(provider="provider_without_match_configured")

../../../tests/integration/test_core_search.py:554: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../eodag/api/core.py:1184: in search
    search_plugins, search_kwargs = self._prepare_search(
../../../eodag/api/core.py:1756: in _prepare_search
    self._fetch_external_product_type(provider, product_type)
../../../eodag/api/core.py:1647: in _fetch_external_product_type
    product_type_config = plugin.discover_product_types(**kwargs)
../../../eodag/plugins/search/qssearch.py:458: in discover_product_types
    return self.discover_product_types_per_page(**kwargs)
../../../eodag/plugins/search/qssearch.py:546: in discover_product_types_per_page
    response = QueryStringSearch._request(self, prep)
../../../eodag/plugins/search/qssearch.py:1254: in _request
    response = session.get(
/usr/lib/python3/dist-packages/requests/sessions.py:602: in get
    return self.request("GET", url, **kwargs)
/usr/lib/python3/dist-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
/usr/lib/python3/dist-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
/usr/lib/python3/dist-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
/usr/lib/python3/dist-packages/urllib3/connectionpool.py:773: in urlopen
    self._prepare_proxy(conn)
/usr/lib/python3/dist-packages/urllib3/connectionpool.py:1042: in _prepare_proxy
    conn.connect()
/usr/lib/python3/dist-packages/urllib3/connection.py:704: in connect
    self.sock = sock = self._new_conn()
/usr/lib/python3/dist-packages/urllib3/connection.py:198: in _new_conn
    sock = connection.create_connection(
/usr/lib/python3/dist-packages/urllib3/util/connection.py:64: in create_connection
    sock = socket.socket(af, socktype, proto)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cls = <class 'pytest_socket.disable_socket.<locals>.GuardedSocket'>
family = <AddressFamily.AF_INET: 2>, type = <SocketKind.SOCK_STREAM: 1>
proto = 6, fileno = None

    def __new__(cls, family=-1, type=-1, proto=-1, fileno=None):
        if _is_unix_socket(family) and allow_unix_socket:
            return super().__new__(cls, family, type, proto, fileno)
    
>       raise SocketBlockedError()
E       pytest_socket.SocketBlockedError: A test tried to use socket.socket.

/usr/lib/python3/dist-packages/pytest_socket.py:89: SocketBlockedError
____________________ TestRequirements.test_all_requirements ____________________

self = <tests.test_requirements.TestRequirements testMethod=test_all_requirements>

    def test_all_requirements(self):
        """Needed libraries must be in project requirements"""
    
        project_imports = get_project_imports(project_path)
>       setup_requires = get_setup_requires(setup_cfg_path)

../../../tests/test_requirements.py:137: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../tests/test_requirements.py:80: in get_setup_requires
    for r in config["options"]["install_requires"].split("\n")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <configparser.ConfigParser object at 0x77b0e89a3cb0>, key = 'options'

    def __getitem__(self, key):
        if key != self.default_section and not self.has_section(key):
>           raise KeyError(key)
E           KeyError: 'options'

/usr/lib/python3.13/configparser.py:998: KeyError
_____________________ TestRequirements.test_plugins_extras _____________________

self = <tests.test_requirements.TestRequirements testMethod=test_plugins_extras>

    def test_plugins_extras(self):
        """All optional dependencies needed by providers must be resolved with all-providers extra"""
    
>       plugins_extras_dict = get_entrypoints_extras(setup_cfg_path)

../../../tests/test_requirements.py:165: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../tests/test_requirements.py:117: in get_entrypoints_extras
    for group in config["options.entry_points"].keys():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <configparser.ConfigParser object at 0x77b0e8815810>
key = 'options.entry_points'

    def __getitem__(self, key):
        if key != self.default_section and not self.has_section(key):
>           raise KeyError(key)
E           KeyError: 'options.entry_points'

/usr/lib/python3.13/configparser.py:998: KeyError
__ TestCoreInvolvingConfDir.test_core_object_creates_config_standard_location __

self = <tests.units.test_core.TestCoreInvolvingConfDir testMethod=test_core_object_creates_config_standard_location>

    def test_core_object_creates_config_standard_location(self):
        """The core object must create a user config file in standard user config location on instantiation"""
>       self.execution_involving_conf_dir(inspect="eodag.yml")

../../../tests/units/test_core.py:2064: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../tests/units/test_core.py:2054: in execution_involving_conf_dir
    self.assertTrue(os.path.exists(current))
E   AssertionError: False is not true
------------------------------ Captured log call -------------------------------
WARNING  eodag.core:core.py:139 Cannot create configuration directory /nonexistent/.config/eodag. Falling back to temporary directory /tmp/.config/eodag.
WARNING  eodag.core:core.py:144 You can set the path of the configuration directory with the environment variable EODAG_CFG_DIR
WARNING  eodag.core:core.py:139 Cannot create configuration directory /nonexistent/.config/eodag. Falling back to temporary directory /tmp/.config/eodag.
WARNING  eodag.core:core.py:144 You can set the path of the configuration directory with the environment variable EODAG_CFG_DIR
_____ TestCoreInvolvingConfDir.test_core_object_creates_index_if_not_exist _____

self = <tests.units.test_core.TestCoreInvolvingConfDir testMethod=test_core_object_creates_index_if_not_exist>

    def test_core_object_creates_index_if_not_exist(self):
        """The core object must create an index in user config directory"""
>       self.execution_involving_conf_dir(inspect=".index")

../../../tests/units/test_core.py:2068: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../tests/units/test_core.py:2054: in execution_involving_conf_dir
    self.assertTrue(os.path.exists(current))
E   AssertionError: False is not true
------------------------------ Captured log call -------------------------------
WARNING  eodag.core:core.py:139 Cannot create configuration directory /nonexistent/.config/eodag. Falling back to temporary directory /tmp/.config/eodag.
WARNING  eodag.core:core.py:144 You can set the path of the configuration directory with the environment variable EODAG_CFG_DIR
WARNING  eodag.core:core.py:139 Cannot create configuration directory /nonexistent/.config/eodag. Falling back to temporary directory /tmp/.config/eodag.
WARNING  eodag.core:core.py:144 You can set the path of the configuration directory with the environment variable EODAG_CFG_DIR
_ TestCoreInvolvingConfDir.test_core_object_creates_locations_standard_location _

self = <tests.units.test_core.TestCoreInvolvingConfDir testMethod=test_core_object_creates_locations_standard_location>

    def test_core_object_creates_locations_standard_location(self):
        """The core object must create a locations config file and a shp dir in standard user config location on instantiation"""  # noqa
>       self.execution_involving_conf_dir(inspect=["locations.yml", "shp"])

../../../tests/units/test_core.py:2072: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../tests/units/test_core.py:2054: in execution_involving_conf_dir
    self.assertTrue(os.path.exists(current))
E   AssertionError: False is not true
------------------------------ Captured log call -------------------------------
WARNING  eodag.core:core.py:139 Cannot create configuration directory /nonexistent/.config/eodag. Falling back to temporary directory /tmp/.config/eodag.
WARNING  eodag.core:core.py:144 You can set the path of the configuration directory with the environment variable EODAG_CFG_DIR
WARNING  eodag.core:core.py:139 Cannot create configuration directory /nonexistent/.config/eodag. Falling back to temporary directory /tmp/.config/eodag.
WARNING  eodag.core:core.py:144 You can set the path of the configuration directory with the environment variable EODAG_CFG_DIR
_______________ TestCoreInvolvingConfDir.test_read_only_home_dir _______________

self = <tests.units.test_core.TestCoreInvolvingConfDir testMethod=test_read_only_home_dir>

    def test_read_only_home_dir(self):
        # standard directory
        home_dir = os.path.join(os.path.expanduser("~"), ".config", "eodag")
>       self.execution_involving_conf_dir(inspect="eodag.yml", conf_dir=home_dir)

../../../tests/units/test_core.py:2077: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../tests/units/test_core.py:2054: in execution_involving_conf_dir
    self.assertTrue(os.path.exists(current))
E   AssertionError: False is not true
------------------------------ Captured log call -------------------------------
WARNING  eodag.core:core.py:139 Cannot create configuration directory /nonexistent/.config/eodag. Falling back to temporary directory /tmp/.config/eodag.
WARNING  eodag.core:core.py:144 You can set the path of the configuration directory with the environment variable EODAG_CFG_DIR
WARNING  eodag.core:core.py:139 Cannot create configuration directory /nonexistent/.config/eodag. Falling back to temporary directory /tmp/.config/eodag.
WARNING  eodag.core:core.py:144 You can set the path of the configuration directory with the environment variable EODAG_CFG_DIR
______________ TestEOProduct.test_eoproduct_download_progress_bar ______________

self = <tests.units.test_eoproduct.TestEOProduct testMethod=test_eoproduct_download_progress_bar>

    def test_eoproduct_download_progress_bar(self):
        """eoproduct.download must show a progress bar"""
        product = self._dummy_downloadable_product()
        product.properties["id"] = 12345
        progress_callback = ProgressCallback()
    
        # progress bar did not start
        self.assertEqual(progress_callback.n, 0)
    
        # extract=true would replace bar desc with extraction status
        product.download(
            progress_callback=progress_callback,
            output_dir=self.output_dir,
            extract=False,
        )
    
        # should be product id cast to str
        self.assertEqual(progress_callback.desc, "12345")
    
        # progress bar finished
>       self.assertEqual(progress_callback.n, progress_callback.total)
E       AssertionError: 0 != 1

../../../tests/units/test_eoproduct.py:449: AssertionError
__________________________ TestUtils.test_fetch_json ___________________________

self = <tests.units.test_utils.TestUtils testMethod=test_fetch_json>

    def test_fetch_json(self):
        """fetch_json must be able to fetch a distant json file"""
    
        # distant
        file_url = "https://foo.bar"
        with unittest.mock.patch(
            "eodag.utils.requests.requests.sessions.Session.get",
            autospec=True,
        ) as mock_get:
            mock_get.return_value = unittest.mock.Mock()
            mock_get.return_value.json.return_value = {"foo": "bar"}
            file_content = fetch_json(file_url)
            self.assertEqual(file_content["foo"], "bar")
            mock_get.assert_called_once_with(
                mock.ANY,
                file_url,
                headers=USER_AGENT,
                auth=None,
                timeout=HTTP_REQ_TIMEOUT,
            )
    
        # distant error
        with unittest.mock.patch(
            "eodag.utils.requests.requests.get",
            autospec=True,
            side_effect=RequestException,
        ) as mock_get:
>           self.assertRaises(RequestError, fetch_json, file_url)

../../../tests/units/test_utils.py:361: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../eodag/utils/requests.py:56: in fetch_json
    res = req_session.get(
/usr/lib/python3/dist-packages/requests/sessions.py:602: in get
    return self.request("GET", url, **kwargs)
/usr/lib/python3/dist-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
/usr/lib/python3/dist-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
/usr/lib/python3/dist-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
/usr/lib/python3/dist-packages/urllib3/connectionpool.py:773: in urlopen
    self._prepare_proxy(conn)
/usr/lib/python3/dist-packages/urllib3/connectionpool.py:1042: in _prepare_proxy
    conn.connect()
/usr/lib/python3/dist-packages/urllib3/connection.py:704: in connect
    self.sock = sock = self._new_conn()
/usr/lib/python3/dist-packages/urllib3/connection.py:198: in _new_conn
    sock = connection.create_connection(
/usr/lib/python3/dist-packages/urllib3/util/connection.py:64: in create_connection
    sock = socket.socket(af, socktype, proto)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def __new__(cls, family=-1, type=-1, proto=-1, fileno=None):
        if _is_unix_socket(family) and allow_unix_socket:
            return super().__new__(cls, family, type, proto, fileno)
    
>       raise SocketBlockedError()
E       pytest_socket.SocketBlockedError: A test tried to use socket.socket.

/usr/lib/python3/dist-packages/pytest_socket.py:89: SocketBlockedError
=============================== warnings summary ===============================

[...]

=========================== short test summary info ============================
FAILED ../../../tests/integration/test_core_search.py::TestCoreSearch::test_core_search_auths_matching
FAILED ../../../tests/test_requirements.py::TestRequirements::test_all_requirements
FAILED ../../../tests/test_requirements.py::TestRequirements::test_plugins_extras
FAILED ../../../tests/units/test_core.py::TestCoreInvolvingConfDir::test_core_object_creates_config_standard_location
FAILED ../../../tests/units/test_core.py::TestCoreInvolvingConfDir::test_core_object_creates_index_if_not_exist
FAILED ../../../tests/units/test_core.py::TestCoreInvolvingConfDir::test_core_object_creates_locations_standard_location
FAILED ../../../tests/units/test_core.py::TestCoreInvolvingConfDir::test_read_only_home_dir
FAILED ../../../tests/units/test_eoproduct.py::TestEOProduct::test_eoproduct_download_progress_bar
FAILED ../../../tests/units/test_utils.py::TestUtils::test_fetch_json - pytes...
============ 9 failed, 570 passed, 3 skipped, 46 warnings in 54.67s ============

For

FAILED ../../../tests/integration/test_core_search.py::TestCoreSearch::test_core_search_auths_matching
FAILED ../../../tests/units/test_utils.py::TestUtils::test_fetch_json - pytes...

the problem seems to be linked to an attempt to access the internet.

For

FAILED ../../../tests/units/test_core.py::TestCoreInvolvingConfDir::test_core_object_creates_config_standard_location
FAILED ../../../tests/units/test_core.py::TestCoreInvolvingConfDir::test_core_object_creates_index_if_not_exist
FAILED ../../../tests/units/test_core.py::TestCoreInvolvingConfDir::test_core_object_creates_locations_standard_location
FAILED ../../../tests/units/test_core.py::TestCoreInvolvingConfDir::test_read_only_home_dir

the pronlem seems to be linked to an attempt to read/write to the HOME folder (which points to an unexisting path in the Debian tests).

For

FAILED ../../../tests/test_requirements.py::TestRequirements::test_all_requirements
FAILED ../../../tests/test_requirements.py::TestRequirements::test_plugins_extras

apparently, the issue seems to be linked to the impossibility to access the proper configuration file.
I need to check.

For the last one it is not clear to me the reason of the failure

FAILED ../../../tests/units/test_eoproduct.py::TestEOProduct::test_eoproduct_download_progress_bar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants