diff --git a/.kokoro/system.sh b/.kokoro/system.sh index 7214ff3c664f..91a35d1f22b9 100755 --- a/.kokoro/system.sh +++ b/.kokoro/system.sh @@ -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 diff --git a/packages/google-cloud-storage/README.rst b/packages/google-cloud-storage/README.rst index 9e9014ddcedc..62db3015daa7 100644 --- a/packages/google-cloud-storage/README.rst +++ b/packages/google-cloud-storage/README.rst @@ -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 + diff --git a/packages/google-cloud-storage/cloudbuild/run_zonal_tests.sh b/packages/google-cloud-storage/cloudbuild/run_zonal_tests.sh index 2d42ce6d5f68..7baabf888753 100644 --- a/packages/google-cloud-storage/cloudbuild/run_zonal_tests.sh +++ b/packages/google-cloud-storage/cloudbuild/run_zonal_tests.sh @@ -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 ---' @@ -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 diff --git a/packages/google-cloud-storage/cloudbuild/zb-system-tests-cloudbuild.yaml b/packages/google-cloud-storage/cloudbuild/zb-system-tests-cloudbuild.yaml index 26daa8ae92d9..9064f159b7bb 100644 --- a/packages/google-cloud-storage/cloudbuild/zb-system-tests-cloudbuild.yaml +++ b/packages/google-cloud-storage/cloudbuild/zb-system-tests-cloudbuild.yaml @@ -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 diff --git a/packages/google-cloud-storage/google/cloud/storage/client.py b/packages/google-cloud-storage/google/cloud/storage/client.py index 528b2255f451..f721de87c55b 100644 --- a/packages/google-cloud-storage/google/cloud/storage/client.py +++ b/packages/google-cloud-storage/google/cloud/storage/client.py @@ -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."""