* Use retry func while trying to ping SQL datastore
- implements retry func specifically for SQL datastore ping
- fmt fixes
- using sqlx.Db.PingContext instead of sqlx.Db.Ping
- propogate context to SQL datastore
* Use alpine images to make tests take less time
* use PG alpine
* use Minio alpine
* no official alpine distro for MySQL, uhhh :(
* install swagger tool instead of docker image
* use retry func to confirm that datastore is okay before running tests
* Store swagger tool at Fn during CI time
somehow it's a problem to put binary to ${GOPATH}/bin
* Adjust swagger tool reference path
* Revert minio image
* Use amd64/alpine-based swagger tool image for API spec validation
* Cleanup
* Adjust API tests internal API
* Refactor API tests to take less time
- sqlite: tests 15s, overall time: 1m
- mysql: tests 15s, overall time: 59s
* Use retry func to survive in faulty places
* Use retry func while trying to ping SQL datastore
- implements retry func specifically for SQL datastore ping
- fmt fixes
- using sqlx.Db.PingContext instead of sqlx.Db.Ping
- propogate context to SQL datastore
* Simplify TestCanCauseTimeout retry loop
* Call retry with sane timeout
* Fix TestOversizedLog, use retry func
* Increase number of attempts
2 test cases are really faulty in CI, so they need a lot more time to finish.
* Increase TestCanCauseTimeout timeout
* Use retry at TestMultiLog to speed it up
* Use retry at TestCanWriteLogs to speed it up
* Use retry at TestGetCallsSuccess to speed it up
* Use retry at TestCanGetAsyncState to speed it up
* Use retry at TestListCallsSuccess to speed it up
* Remove sleep calls
* Remove dup test case
* Cleaup Calls API test
* Build API tests binary once
This patch lets CI to build API tests binary once and reuse that whenever it needs it
* Swap API tests checks
* Build API test binary by default
dirty fix for CircleCI
* Use retry func to determine if datastore is alive in tests
* go install should also reduce build time
* Fix rebase issues
* fn: circleci and makefile adjustments
*) Moved more tasks into Makefile to allow for
parallelism and dependency checks.
*) Added cpu count in circleci make invocations
for parallelism
* fn: typo sqlite => sqlite3
* fn: removed unnecessary make pull & install
replace default bolt option with sqlite3 option. the story here is that we
just need a working out of the box solution, and sqlite3 is just fine for that
(actually, likely better than bolt).
with sqlite3 supplanting bolt, we mostly have sql databases. so remove redis
and then we just have one package that has a `sql` implementation of the
`models.Datastore` and lean on sqlx to do query rewriting. this does mean
queries have to be formed a certain way and likely have to be ANSI-SQL (no
special features) but we weren't using them anyway and our base api is
basically done and we can easily extend this api as needed to only implement
certain methods in certain backends if we need to get cute.
* remove bolt & redis datastores (can still use as mqs)
* make sql queries work on all 3 (maybe?)
* remove bolt log store and use sqlite3
* shove the FnLog shit into the datastore shit for now (free pg/mysql logs...
just for demos, etc, not prod)
* fix up the docs to remove bolt references
* add sqlite3, sqlx dep
* fix up tests & mock stuff, make validator less insane
* remove put & get in datastore layer as nobody is using.
this passes tests which at least seem like they test all the different
backends. if we trust our tests then this seems to work great. (tests `make
docker-test-run-with-*` work now too)