Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Mark tests requiring network access #457

Closed

Description

@mcepl

All builds (and running test suites as part of them) of OpenSUSE packages (the same for every other Linux or Mac distribution) happen in the chrooted environment without the network access, which makes running of the test suite for this package extremely awkward. Most of tests fail because they require network access, which is a bad idea even for other reasons (mocking is the way to go).

no-network.patch is the solution of my problem, marking all tests requiring network access appropriately, and then skipping so marked ones.

Environment details

  • OS type and version: any build system without network access
  • Python version: any (tested with Python 3.6-3.9)
  • pip version: any
  • google-cloud-storage version: 1.38.0 (from the tarball from PyPI)

Activity

  1. added
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    on Jun 8, 2021
  2. tseaver commented on Jun 9, 2021

    @tseaver
    Contributor

    PR #416 tracks updating all unit tests such that they no longer require actual credentials to run: none of them actually make use of the network, but the patches for the PRs tracked there ensure it (by mocking out the client). Most are already merged, except for PR #459, which should merge soon. If you'd like to test in your environment, try checking out the 416-avoid_real_client_in_bucket_blob_unit_tests branch: the unit tests run cleanly in my environment with no credentials configured.

    All system tests, however, are intended to call the actual APIs -- they are how we ensure that the library does not drift away from the backend.

  3. self-assigned this
    on Jun 9, 2021
  4. mcepl commented on Jun 9, 2021

    @mcepl
    Author

    All system tests, however, are intended to call the actual APIs -- they are how we ensure that the library does not drift away from the backend.

    I understand that. However, I really have no network access in the build system, and I would appreciate even just a partial test suite to find out that the package is not completely broken.

  5. tseaver commented on Jun 9, 2021

    @tseaver
    Contributor

    @mcepl You should be able to run the unit test suite without any network access: I just did it with my laptop in "airplane mode" on the 416-avoid_real_client_in_bucket_blob_unit_tests branch:

    Screenshot from 2021-06-09 11-01-42

  6. added
    type: questionRequest for information or clarification. Not an issue.
    and removed
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    on Jun 9, 2021
  7. mcepl commented on Jun 9, 2021

    @mcepl
    Author

    Yes, that branch works offline as well, thank you. However, there is no way for me to include this into the official openSUSE unreleased, so I will wait on that. Thank you very much anyway.

  8. tseaver commented on Jun 9, 2021

    @tseaver
    Contributor

    I expect that branch's PR to be merged shortly, with a new release to follow this week.

  9. tseaver commented on Jun 9, 2021

    @tseaver
    Contributor

    @mcepl PR #459 has now merged. We will be making a release no later than next Monday, 2021-06-14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the googleapis/python-storage API.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions