test cache
This commit is contained in:
12
app/crawler/cache_test.sh
Normal file
12
app/crawler/cache_test.sh
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
test_path() {
|
||||||
|
cache path abc | tr '/' '\n' | tail -n 1 | grep -q $(echo -n abc | base64)
|
||||||
|
}
|
||||||
|
|
||||||
|
test_get_put_get() {
|
||||||
|
export CACHE_DURATION=10
|
||||||
|
! cache get abc
|
||||||
|
echo hi | cache put abc > /dev/null
|
||||||
|
cache get abc | grep -q .
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user