Skip to content
forked from enfabrica/enkit

Toolkit for lean builds and team management.

License

Notifications You must be signed in to change notification settings

silas-enf/enkit

 
 

Repository files navigation

Enkit (engineering toolkit)


##Testing

Setting up for tests

Non-bazel managed dependencies

  1. 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

  2. Get a service account from <x, Y, Z person>

    • Put it in astore/testdata/credentials.json
      >
Examples of Running Tests
  • 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 //...

Adding Tests
  1. Create the test in * _test.go
  2. Run

    bazel run //:gazelle

  • if your test needs server dependencies, such as astore or minio
    1. 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

Developing Tests

About

Toolkit for lean builds and team management.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 64.6%
  • Starlark 17.4%
  • Shell 10.9%
  • C 2.7%
  • Python 1.5%
  • C++ 1.4%
  • Other 1.5%