Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 1.45 KB

DEVELOPMENT.md

File metadata and controls

56 lines (38 loc) · 1.45 KB

Development

Setup

  1. Clone this repo.

  2. Copy the Git pre-commit hooks. This will automatically check the build, run tests, and perform linting before each commit. (Symlinks don't seem to work, but if you find a way, please add it here!)

    cp .githooks/pre-commit .git/hooks/pre-commit
  3. Install dependencies with pip install .

Unit Tests

Execute unit tests by running one of the sessions prefixed with unit-.

  • Example: nox -s unit-3.8
  • See all Nox sessions with nox -l.

Formatting

  • Lint sources by running nox -s blacken. Use nox -s lint to run lint check.

Integration Tests

  • Run a single integration test for one API. This generates Python source code with the microgenerator and compares them to the golden files in tests/integration/goldens/asset.

    bazel test //tests/integration:asset
  • Run integration tests for all APIs.

    bazel test //tests/integration:all
  • Update all goldens files. This overwrites the golden files in tests/integration/goldens/.

    bazel run //tests/integration:asset_update
    bazel run //tests/integration:credentials_update
    bazel run //tests/integration:eventarc_update
    bazel run //tests/integration:logging_update
    bazel run //tests/integration:logging_internal_update
    bazel run //tests/integration:redis_update
    bazel run //tests/integration:redis_selective_update