Skip to content
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

test_report contains some tests accessing network #234

Open
RaitoBezarius opened this issue Aug 23, 2022 · 0 comments
Open

test_report contains some tests accessing network #234

RaitoBezarius opened this issue Aug 23, 2022 · 0 comments

Comments

@RaitoBezarius
Copy link
Contributor

Thanks for the many mocks which should ensure no usage of network for these tests, it seems some of them are still trying to access network, putting the tests in a sandbox with no network access yields:

tests/commands/test_report.py:431: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/nix/store/fq7gp2923vl5828xqgd79kdv1gadjmk9-ripe-atlas-tools-3.0.2/lib/python3.10/site-packages/ripe/atlas/tools/commands/report.py:205: in run
    renderer.render(results)
/nix/store/fq7gp2923vl5828xqgd79kdv1gadjmk9-ripe-atlas-tools-3.0.2/lib/python3.10/site-packages/ripe/atlas/tools/renderers/base.py:196: in render
    for sagan in results:
/nix/store/fq7gp2923vl5828xqgd79kdv1gadjmk9-ripe-atlas-tools-3.0.2/lib/python3.10/site-packages/ripe/atlas/tools/filters.py:131: in __iter__
    for sagan in self._attach_probes(sagans):
/nix/store/fq7gp2923vl5828xqgd79kdv1gadjmk9-ripe-atlas-tools-3.0.2/lib/python3.10/site-packages/ripe/atlas/tools/filters.py:144: in _attach_probes
    for p in Probe.get_many(
/nix/store/fq7gp2923vl5828xqgd79kdv1gadjmk9-ripe-atlas-tools-3.0.2/lib/python3.10/site-packages/ripe/atlas/tools/filters.py:196: in get_many
    for probe in [p for p in ProbeRequest(return_objects=True, **kwargs)]:
/nix/store/fq7gp2923vl5828xqgd79kdv1gadjmk9-ripe-atlas-tools-3.0.2/lib/python3.10/site-packages/ripe/atlas/tools/filters.py:196: in <listcomp>
    for probe in [p for p in ProbeRequest(return_objects=True, **kwargs)]:
/nix/store/505gqw4by1k1xyxi423kwyw1q9p7rq5d-python3.10-ripe-atlas-cousteau-1.5.1/lib/python3.10/site-packages/ripe/atlas/cousteau/api_listing.py:101: in __next__
    return self.next()
/nix/store/505gqw4by1k1xyxi423kwyw1q9p7rq5d-python3.10-ripe-atlas-cousteau-1.5.1/lib/python3.10/site-packages/ripe/atlas/cousteau/api_listing.py:107: in next
    self.next_batch()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ripe.atlas.cousteau.api_listing.ProbeRequest object at 0x7ffff3369ea0>

    def next_batch(self):
        """
        Querying API for the next batch of objects and store next url and
        batch of objects.
        """
        is_success, results = AtlasRequest(
            url_path=self.atlas_url,
            user_agent=self._user_agent,
            server=self.server,
            verify=self.verify,
        ).get()
    
        if not is_success:
>           raise APIResponseError(results)
E           ripe.atlas.cousteau.exceptions.APIResponseError: (MaxRetryError("HTTPSConnectionPool(host='atlas.ripe.net', port=443): Max retries exceeded with url: /api/v2/probes/?id__in=1216,165,202,2225,270,579,677,879,945 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ffff30256c0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))"),)

/nix/store/505gqw4by1k1xyxi423kwyw1q9p7rq5d-python3.10-ripe-atlas-cousteau-1.5.1/lib/python3.10/site-packages/ripe/atlas/cousteau/api_listing.py:130: APIResponseError
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

1 participant