summaryrefslogtreecommitdiff
path: root/testkiki
diff options
context:
space:
mode:
authorJames Crayne <jim.crayne@gmail.com>2016-04-27 21:32:22 -0400
committerJames Crayne <jim.crayne@gmail.com>2016-04-27 22:29:24 -0400
commit5d7edcd9d08d86e72fdc65116f3debbde6086845 (patch)
tree9d30a28d9bfe2c2fc6aad4e5edf5b2bd04b3eabc /testkiki
parent23d4552eba4a684f45f6da3682734360315e89cb (diff)
transactional refreshCache function in cokiki
Diffstat (limited to 'testkiki')
-rw-r--r--testkiki/testkiki.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/testkiki/testkiki.hs b/testkiki/testkiki.hs
index 90b6635..c8b141b 100644
--- a/testkiki/testkiki.hs
+++ b/testkiki/testkiki.hs
@@ -262,7 +262,7 @@ doTests tkConfig = hspec $ do
262 262
263 -- **** cokiki tests ***** 263 -- **** cokiki tests *****
264 describe "cokiki ssh-client" $ do 264 describe "cokiki ssh-client" $ do
265 it "modifies system ssh configuration to respect /var/cache/kiki/ssh_known_hosts." $ 265 it "modifies system ssh configuration to respect /var/cache/kiki/config/ssh_known_hosts." $
266 onlyIf didInit3 $ do 266 onlyIf didInit3 $ do
267 let cfg' = appendpaths tkConfig "3" 267 let cfg' = appendpaths tkConfig "3"
268 home = "root" -- chroot cfg' </> "root" 268 home = "root" -- chroot cfg' </> "root"
@@ -287,8 +287,8 @@ doTests tkConfig = hspec $ do
287 nonComment x = not ("#" `B.isPrefixOf` x) 287 nonComment x = not ("#" `B.isPrefixOf` x)
288 lines <- filter nonComment . map dropSp . B.lines <$> B.readFile file 288 lines <- filter nonComment . map dropSp . B.lines <$> B.readFile file
289 return (any (x `B.isInfixOf`) lines) ) 289 return (any (x `B.isInfixOf`) lines) )
290 -- does it already mention /var/cache/kiki/ssh_known_hosts? expect not 290 -- does it already mention /var/cache/kiki/config/ssh_known_hosts? expect not
291 subStr0 <- etcFile `hasSubStr` "/var/cache/kiki/ssh_known_hosts" 291 subStr0 <- etcFile `hasSubStr` "/var/cache/kiki/config/ssh_known_hosts"
292 bReplace <- etcFile `hasUnCommentedSubStr` "GlobalKnownHostsFile" 292 bReplace <- etcFile `hasUnCommentedSubStr` "GlobalKnownHostsFile"
293 (code,(outs,ers)) <- runExternal (mkCokiki cfg ["ssh-client"]) Nothing 293 (code,(outs,ers)) <- runExternal (mkCokiki cfg ["ssh-client"]) Nothing
294 -- outs <- cokiki cfg ["ssh-client"] myStdErr 294 -- outs <- cokiki cfg ["ssh-client"] myStdErr
@@ -298,8 +298,8 @@ doTests tkConfig = hspec $ do
298 (lost,gained) <- linesSubtractedAndAdded etcFile 298 (lost,gained) <- linesSubtractedAndAdded etcFile
299 -- did Sha1 change? expect it did 299 -- did Sha1 change? expect it did
300 bChanged <- isChangedSha1 etcFile 300 bChanged <- isChangedSha1 etcFile
301 -- does it mention /var/cache/kiki/ssh_known_hosts now? expect it does 301 -- does it mention /var/cache/kiki/config/ssh_known_hosts now? expect it does
302 subStr <- etcFile `hasSubStr` "/var/cache/kiki/ssh_known_hosts" 302 subStr <- etcFile `hasSubStr` "/var/cache/kiki/config/ssh_known_hosts"
303 -- new mtime 303 -- new mtime
304 mtime <- getModificationTime etcFile 304 mtime <- getModificationTime etcFile
305 if bReplace then 305 if bReplace then