File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,8 @@ source module ci/lib/io.sh
2828
2929# To run the integration tests we need to install the dependencies for the storage emulator
3030export PATH=" ${HOME} /.local/bin:${PATH} "
31- python3 -m pip install --quiet " git+https://github.com/googleapis/storage-testbench@v0.9.0"
31+ python3 -m pip uninstall -y --quiet googleapis-storage-testbench
32+ python3 -m pip install --upgrade --user --quiet " git+https://github.com/googleapis/storage-testbench@v0.10.0"
3233
3334# Some of the tests will need a valid roots.pem file.
3435rm -f /dev/shm/roots.pem
Original file line number Diff line number Diff line change @@ -85,9 +85,25 @@ printf '{"name": "%s"}' "${GOOGLE_CLOUD_CPP_STORAGE_TEST_DESTINATION_BUCKET_NAME
8585 curl -X POST -H " Content-Type: application/json" --data-binary @- \
8686 " ${CLOUD_STORAGE_EMULATOR_ENDPOINT} /storage/v1/b?project=${GOOGLE_CLOUD_PROJECT} "
8787
88+ # This is just the SHA for the *description* of the testbench, it includes its
89+ # version and other info, but no details about the contents.
8890TESTBENCH_SHA=" $( pip show googleapis-storage-testbench | sha256sum) "
91+ # With these two commands we extract the SHA of the testbench contents. It
92+ # excludes the contents of its deps (say gRPC, or Flask), as those are unlikely
93+ # to affect the results of the test.
94+ TESTBENCH_LOCATION=" $( pip show googleapis-storage-testbench | sed -n ' s/^Location: //p' ) "
95+ TESTBENCH_CONTENTS_SHA=" $(
96+ cd " ${TESTBENCH_LOCATION} "
97+ pip show --files googleapis-storage-testbench |
98+ sed -n ' /^Files:/,$p' |
99+ grep ' \.py$' |
100+ xargs sha256sum |
101+ sort |
102+ sha256sum -
103+ ) "
89104emulator_args=(
90105 " --test_env=TESTBENCH_SHA=${TESTBENCH_SHA} "
106+ " --test_env=TESTBENCH_CONTENTS_SHA=${TESTBENCH_CONTENTS_SHA} "
91107 " --test_env=CLOUD_STORAGE_EMULATOR_ENDPOINT=${CLOUD_STORAGE_EMULATOR_ENDPOINT} "
92108 " --test_env=CLOUD_STORAGE_GRPC_ENDPOINT=${CLOUD_STORAGE_GRPC_ENDPOINT} "
93109 " --test_env=HTTPBIN_ENDPOINT=${HTTPBIN_ENDPOINT} "
You can’t perform that action at this time.
0 commit comments