forked from carimura/cli
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·33 lines (26 loc) · 703 Bytes
/
test.sh
File metadata and controls
executable file
·33 lines (26 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
set -ex
make build
export fn="$(pwd)/fn"
$fn --version
go test $(go list ./... | grep -v /vendor/ | grep -v /tests)
# This tests all the quickstart commands on the cli on a live server
rm -rf tmp
mkdir tmp
cd tmp
funcname="fn-test-go"
$fn init --runtime go $DOCKER_USER/$funcname
$fn test
someport=50080
docker rm --force functions || true # just in case
docker pull fnproject/functions
docker run --name functions -d -v /var/run/docker.sock:/var/run/docker.sock -p $someport:8080 fnproject/functions
sleep 10
docker logs functions
export API_URL="http://localhost:$someport"
$fn apps l
$fn apps create myapp
$fn apps l
$fn deploy myapp
$fn call myapp $funcname
docker rm --force functions
cd ..