test cache

This commit is contained in:
Bel LaPointe
2022-02-01 09:47:21 -07:00
parent daaa266186
commit 155cfe1851

12
app/crawler/cache_test.sh Normal file
View 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 .
}