vlab-research / fly

The Fly Survey platform
Other
2 stars 3 forks source link

Add test suite #66

Open calufa opened 2 years ago

calufa commented 2 years ago

Ticket: https://github.com/vlab-research/fly/issues/64

TODO:

netlify[bot] commented 2 years ago

✔️ Deploy Preview for vlab-research canceled.

🔨 Explore the source changes: 3d2e20a78ad24a4e294d6fefb55e8351e4fc3ed3

🔍 Inspect the deploy log: https://app.netlify.com/sites/vlab-research/deploys/6200a5f6bbee6f0007f427fe

nandanrao commented 2 years ago

Couple thoughts:

  1. Let's make sure it's documented
  2. Let's make sure that if it doesn't need a database, it doesn't wait on a database (replybot).
  3. Let's make sure we have a way to do coverage reports (i.e. go test -coverprofile) and test single functions (go test -run) etc.
calufa commented 2 years ago

Alright, just double-check the code. Left some comments.

The only services we didn't add test-suites to are:

calufa commented 2 years ago

For test coverage on services written in go, we are now printing the coverage at the beginning of each test-suite run, and it looks something like this:

... 
Running tests...
[nodemon] 2.0.15
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: (all)
[nodemon] starting `go test -cover -tags dynamic`
PASS
coverage: 86.4% of statements <--------------------------