mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Examples changes (#201)
This commit is contained in:
21
examples/redis/test.sh
Executable file
21
examples/redis/test.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
set -x
|
||||
|
||||
./build.sh
|
||||
|
||||
PAYLOAD='{
|
||||
"key": "test",
|
||||
"value": "123"
|
||||
}'
|
||||
|
||||
# test it
|
||||
docker stop test-redis-func
|
||||
docker rm test-redis-func
|
||||
|
||||
docker run -p 6379:6379 --name test-redis-func -d redis
|
||||
|
||||
echo $PAYLOAD | docker run --rm -i -e CONFIG_SERVER=redis:6379 -e CONFIG_COMMAND=SET --link test-redis-func:redis iron/func-redis
|
||||
echo $PAYLOAD | docker run --rm -i -e CONFIG_SERVER=redis:6379 -e CONFIG_COMMAND=GET --link test-redis-func:redis iron/func-redis
|
||||
|
||||
docker stop test-redis-func
|
||||
docker rm test-redis-func
|
||||
Reference in New Issue
Block a user