##Testing
Non-bazel managed dependencies
-
google-cloud-sdk
- install here https://cloud.google.com/sdk/docs/install PLEASE NOTE: do not install using snap/brew/apt-get etc emulators do not work
- After following the instructions to install here
- run the following command to get access to the emulators
gcloud components install beta
- Add the gcloud binary to the local binaries directory with the following symlink
ln -s $(which gcloud) /usr/local/bin
-
Get a service account from <x, Y, Z person>
- Put it in astore/testdata/credentials.json
>
- Put it in astore/testdata/credentials.json
- Running a specific go test target
bazel test //astore:go_default_test
- Running specific test of a test file
bazel test //astore:go_default_test --test_filter=^TestServer$
- Running Everything
bazel test //...
- Create the test in * _test.go
- Run
bazel run //:gazelle
- if your test needs server dependencies, such as astore or minio
- Tests must be run as local = True
Clean Up / Dev Helpers
Remove all emulator spawned processes
ps aux | grep gcloud/emulators/datastore | awk '{print $2}' | xargs kill