You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 31, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 31, 2026. It is now read-only.
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)
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_testsbranch: 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.
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.
@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:
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.
Activity
tseaver commentedon Jun 9, 2021
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_testsbranch: 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.
mcepl commentedon Jun 9, 2021
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.
tseaver commentedon Jun 9, 2021
@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_testsbranch:mcepl commentedon Jun 9, 2021
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.
tseaver commentedon Jun 9, 2021
I expect that branch's PR to be merged shortly, with a new release to follow this week.
tseaver commentedon Jun 9, 2021
@mcepl PR #459 has now merged. We will be making a release no later than next Monday, 2021-06-14.