mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
* fn: test scripts should use well defined ports Moved allocation of listener ports for mysql/minio/postgres to helper script with a list of service list names. * fn: makefile docker pull mysql version must match tests
34 lines
987 B
Bash
Executable File
34 lines
987 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 -parallel ${2:-1} ./...; cd ../../
|
|
|
|
remove_containers ${CONTEXT}
|