Giter Club home page Giter Club logo

enkit's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.