add tests for entry deletion from cache
This commit is contained in:
parent
c1f8ec2c56
commit
bba14f6be3
|
@ -107,6 +107,11 @@ spec = do
|
||||||
cacheWithProxyNodeEntry <- addCacheEntry maxNode 0 =<< newCache
|
cacheWithProxyNodeEntry <- addCacheEntry maxNode 0 =<< newCache
|
||||||
nid. cacheGetNodeStateUnvalidated <$> cacheLookupPred (exampleID - 2) cacheWithProxyNodeEntry `shouldBe` Just maxBound
|
nid. cacheGetNodeStateUnvalidated <$> cacheLookupPred (exampleID - 2) cacheWithProxyNodeEntry `shouldBe` Just maxBound
|
||||||
nid. cacheGetNodeStateUnvalidated <$> cacheLookupSucc (anotherID + 2) cacheWithProxyNodeEntry `shouldBe` Just maxBound
|
nid. cacheGetNodeStateUnvalidated <$> cacheLookupSucc (anotherID + 2) cacheWithProxyNodeEntry `shouldBe` Just maxBound
|
||||||
|
it "entries can be deleted" $ do
|
||||||
|
nC <- addCacheEntry maxNode 0 =<< newCache
|
||||||
|
let nc' = deleteCacheEntry maxBound . deleteCacheEntry anotherID $ nC
|
||||||
|
cacheLookup anotherID nc' `shouldBe` Nothing
|
||||||
|
cacheLookup maxBound nc' `shouldBe` Nothing
|
||||||
|
|
||||||
|
|
||||||
describe "NodeCache query lookup" $ do
|
describe "NodeCache query lookup" $ do
|
||||||
|
|
Loading…
Reference in a new issue