tree: 213403f19638cfde82bcf77b63906c5b76f5c485 [path history] [tgz]
  1. .gitignore
  2. OWNERS
  3. README.md
  4. cli/
  5. cmd/
  6. internal/
  7. pbutil/
  8. proto/
  9. sink/
resultdb/README.md

Run Spanner integration tests using Cloud Spanner Emulator

Install Cloud Spanner Emulator

Linux

The Cloud Spanner Emulator is part of the bundled gcloud, to make sure it's installed:

cd infra
gclient runhooks
eval `./go/env.py`
which gcloud # should show bundled gcloud
gcloud components list # should see cloud-spanner-emulator is installed

Mac

If you are a Google employee, follow go/docker-for-mac first.

  • After installing Docker Desktop, go to Preferences > Experimental Features and toggle off “Enable cloud experience” to avoid the error exec: “com.docker.cli”: executable file not found in $PATH.

Note: As of Mar 3, 2021, the newest version of Docker Desktop (3.2.0) is having issues toggling off “Enable cloud experience”, please download 3.1.0 here.

Run tests

From command line, first set environment variables:

export INTEGRATION_TESTS=1
export SPANNER_EMULATOR=1

Then run go test as usual.

Note: If you run tests on Mac, please start Docker Desktop before running tests.