go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/resultdb/README.md (about)

     1  ## Run Spanner integration tests using Cloud Spanner Emulator
     2  
     3  ### Install Cloud Spanner Emulator
     4  
     5  #### Linux
     6  
     7  The Cloud Spanner Emulator is part of the bundled gcloud, to make sure it's installed:
     8  
     9  ```
    10  cd infra
    11  gclient runhooks
    12  eval `./go/env.py`
    13  which gcloud # should show bundled gcloud
    14  gcloud components list # should see cloud-spanner-emulator is installed
    15  ```
    16  
    17  #### Mac
    18  
    19  * [Install Docker Desktop on Mac](https://docs.docker.com/docker-for-mac/install/)
    20  
    21  > If you are a Google employee, follow [go/docker-for-mac](go/docker-for-mac) first.
    22  
    23  
    24  ### Run tests
    25  
    26  From command line, first set environment variables:
    27  
    28  ```
    29  export INTEGRATION_TESTS=1
    30  export SPANNER_EMULATOR=1
    31  ```
    32  
    33  Then run go test as usual.
    34  
    35  > Note: If you run tests on Mac, please start Docker Desktop before running tests.