Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .kokoro/system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,16 @@ packages_with_system_tests=(
"google-cloud-datastore"
"google-cloud-dns"
"google-cloud-error-reporting"
"sqlalchemy-spanner"
"google-cloud-firestore"
"google-cloud-logging"
"google-cloud-ndb"
"google-cloud-pubsub"
"google-cloud-spanner"
"google-cloud-storage"
"google-cloud-testutils"
"sqlalchemy-bigquery"
"pandas-gbq"
"sqlalchemy-bigquery"
"sqlalchemy-spanner"
)

# A file for running system tests
Expand Down
3 changes: 3 additions & 0 deletions packages/google-cloud-storage/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -276,3 +276,6 @@ Next Steps

.. _Google Cloud Storage Product documentation: https://cloud.google.com/storage
.. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst

.. another dummy change

7 changes: 4 additions & 3 deletions packages/google-cloud-storage/cloudbuild/run_zonal_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ echo '--- Installing git and cloning repository on VM ---'
sudo apt-get update && sudo apt-get install -y git python3-pip python3-venv

# Clone the repository and checkout the specific commit from the build trigger.
git clone https://github.com/googleapis/python-storage.git
cd python-storage
git clone --no-checkout --depth 1 --sparse --filter=blob:none https://github.com/googleapis/google-cloud-python.git
cd google-cloud-python
git sparse-checkout set packages/google-cloud-storage
git fetch origin "refs/pull/${_PR_NUMBER}/head"
git checkout ${COMMIT_SHA}
cd packages/google-cloud-storage


echo '--- Installing Python and dependencies on VM ---'
Expand All @@ -27,4 +29,3 @@ export GCE_METADATA_MTLS_MODE=None
CURRENT_ULIMIT=$(ulimit -n)
echo '--- Running Zonal tests on VM with ulimit set to ---' $CURRENT_ULIMIT
pytest -vv -s --log-format='%(asctime)s %(levelname)s %(message)s' --log-date-format='%H:%M:%S' tests/system/test_zonal.py
pytest -vv -s --log-format='%(asctime)s %(levelname)s %(message)s' --log-date-format='%H:%M:%S' samples/snippets/zonal_buckets/zonal_snippets_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ steps:
sleep 15
done
# copy the script to the VM
gcloud compute scp cloudbuild/run_zonal_tests.sh ${_VM_NAME}:~ --zone=${_ZONE} --internal-ip --ssh-key-file=/workspace/.ssh/google_compute_engine
gcloud compute scp packages/google-cloud-storage/cloudbuild/run_zonal_tests.sh ${_VM_NAME}:~ --zone=${_ZONE} --internal-ip --ssh-key-file=/workspace/.ssh/google_compute_engine

# Execute the script on the VM via SSH.
# Capture the exit code to ensure cleanup happens before the build fails.
set +e
gcloud compute ssh ${_VM_NAME} --zone=${_ZONE} --internal-ip --ssh-key-file=/workspace/.ssh/google_compute_engine --command="ulimit -n {_ULIMIT}; COMMIT_SHA=${COMMIT_SHA} _ZONAL_BUCKET=${_ZONAL_BUCKET} CROSS_REGION_BUCKET=${_CROSS_REGION_BUCKET} _PR_NUMBER=${_PR_NUMBER} bash run_zonal_tests.sh"
gcloud compute ssh ${_VM_NAME} --zone=${_ZONE} --internal-ip --ssh-key-file=/workspace/.ssh/google_compute_engine --command="ulimit -n ${_ULIMIT}; COMMIT_SHA=${COMMIT_SHA} _ZONAL_BUCKET=${_ZONAL_BUCKET} CROSS_REGION_BUCKET=${_CROSS_REGION_BUCKET} _PR_NUMBER=${_PR_NUMBER} bash run_zonal_tests.sh"
EXIT_CODE=$?
set -e

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@

_marker = object()

# FOR TESTING PURPOSES
def fake_function():
return None

def _buckets_page_start(iterator, page, response):
"""Grab unreachable buckets after a :class:`~google.cloud.iterator.Page` started."""
Expand Down
Loading