diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-05-13 23:45:24 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-05-13 23:45:26 -0700 |
commit | 9c05b0848f2ed0047544e2859d5c50d1739e45b0 (patch) | |
tree | bd62e154a87a2a100ac14864ab427618d6704e4f | |
parent | 1434bc978f0dc2e25455974903c040230b36101b (diff) | |
download | fatcat-9c05b0848f2ed0047544e2859d5c50d1739e45b0.tar.gz fatcat-9c05b0848f2ed0047544e2859d5c50d1739e45b0.zip |
add test script; commit TODO
As of now, not planning on pursing a golang fatcatd.
-rw-r--r-- | golang/TODO | 5 | ||||
-rwxr-xr-x | golang/test.sh | 12 |
2 files changed, 15 insertions, 2 deletions
diff --git a/golang/TODO b/golang/TODO index 89a1105c..117bcf4d 100644 --- a/golang/TODO +++ b/golang/TODO @@ -9,9 +9,10 @@ x config x sentry x cobra command line parsing? x database creation and access +x 404, not panic, when empty result +- creator post - test framework -- panic recovery middleware -- 404, not panic, when empty result later: +- panic recovery middleware - metrics diff --git a/golang/test.sh b/golang/test.sh new file mode 100755 index 00000000..8e0159e3 --- /dev/null +++ b/golang/test.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -e +echo "" > coverage.txt + +for d in $(go list ./... | grep -v -e internal/mock -e cmd/api/server -e vendor); do + go test -race -coverprofile=profile.out -covermode=atomic "$d" + if [ -f profile.out ]; then + cat profile.out >> coverage.txt + rm profile.out + fi +done |