mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
* fn: remove confusing parallelism in test scripts *) Tests should be consistent when run from makefile versus running these test scripts from command line. Let go use GOMAXPROCS instead of hardcoded 4 cpus in Makefile. *) Moved docker pull for specific image versions into helpers scripts as well. Easier to maintain image version for tests in the same place. *) Minor Makefile cleanup: removed unused makefile targets. * fn: git-diff rename limit increase
34 lines
969 B
Bash
Executable File
34 lines
969 B
Bash
Executable File
#!/bin/bash
|
|
set -exo pipefail
|
|
|
|
export CONTEXT="fn_api_tests"
|
|
source ./helpers.sh
|
|
remove_containers ${CONTEXT}
|
|
|
|
DB_NAME=$1
|
|
export FN_DB_URL=$(spawn_${DB_NAME} ${CONTEXT})
|
|
|
|
#test test/fn-api-tests/fn-api-tests.test
|
|
#status=`echo $?`
|
|
#rebuild="${3:-1}"
|
|
#circleci=`echo ${CIRCLECI}`
|
|
#cd test/fn-api-tests
|
|
#if [[ $status -ne 0 ]] || [[ $rebuild -ne 0 ]] ; then
|
|
# if [[ $circleci == "true" ]]; then
|
|
# # dirty things to make CI pass
|
|
# ls -lah /usr/local/go/pkg/linux_amd64/runtime
|
|
# sudo chown -R `whoami`:root /usr/local/go
|
|
# sudo chmod -R 777 /usr/local/go/pkg/linux_amd64
|
|
# ls -lah /usr/local/go/pkg/linux_amd64/runtime
|
|
# fi
|
|
# pwd
|
|
# go test -i -a -o fn-api-tests.test
|
|
#fi
|
|
#pwd
|
|
#./fn-api-tests.test -test.v -test.parallel ${2:-1} ./...; cd ../../
|
|
|
|
export FN_DS_DB_PING_MAX_RETRIES=60
|
|
cd test/fn-api-tests && FN_API_URL="http://localhost:8080" FN_DB_URL=${FN_DB_URL} go test -v ./...; cd ../../
|
|
|
|
remove_containers ${CONTEXT}
|