summaryrefslogtreecommitdiff
path: root/testkiki/testkiki.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testkiki/testkiki.hs')
-rw-r--r--testkiki/testkiki.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/testkiki/testkiki.hs b/testkiki/testkiki.hs
index 7821df7..ea6ad80 100644
--- a/testkiki/testkiki.hs
+++ b/testkiki/testkiki.hs
@@ -268,7 +268,6 @@ doTests tkConfig = hspec $ do
268 gnuhome = home </> ".gnupg" 268 gnuhome = home </> ".gnupg"
269 cfg = cfg' { gnupghome = gnuhome } 269 cfg = cfg' { gnupghome = gnuhome }
270 etcFile = chroot cfg </> "etc" </> "ssh" </> "ssh_config" 270 etcFile = chroot cfg </> "etc" </> "ssh" </> "ssh_config"
271 etcFileBS = B.pack etcFile
272 -- dump stderr here 271 -- dump stderr here
273 withErrFile (takeDirectory (chroot cfg)) $ \myStdErr -> do 272 withErrFile (takeDirectory (chroot cfg)) $ \myStdErr -> do
274 -- initialize config file with actual systems 273 -- initialize config file with actual systems
@@ -282,14 +281,14 @@ doTests tkConfig = hspec $ do
282 doesFileExist file >>= 281 doesFileExist file >>=
283 (bool (return False) $ B.isPrefixOf x . snd . B.breakSubstring x <$> B.readFile file) 282 (bool (return False) $ B.isPrefixOf x . snd . B.breakSubstring x <$> B.readFile file)
284 -- does it already mention /var/cache/kiki/ssh_known_hosts? expect not 283 -- does it already mention /var/cache/kiki/ssh_known_hosts? expect not
285 subStr0 <- etcFileBS `hasSubStr` "/var/cache/kiki/ssh_known_hosts" 284 subStr0 <- etcFile `hasSubStr` "/var/cache/kiki/ssh_known_hosts"
286 cokiki cfg ["ssh-client"] myStdErr 285 cokiki cfg ["ssh-client"] myStdErr
287 -- get counts of lines subtracted, and lines added, expect (1,1) 286 -- get counts of lines subtracted, and lines added, expect (1,1)
288 (lost,gained) <- linesSubtractedAndAdded etcFile 287 (lost,gained) <- linesSubtractedAndAdded etcFile
289 -- did Sha1 change? expect it did 288 -- did Sha1 change? expect it did
290 bChanged <- compareSha1 etcFile 289 bChanged <- compareSha1 etcFile
291 -- does it mention /var/cache/kiki/ssh_known_hosts now? expect it does 290 -- does it mention /var/cache/kiki/ssh_known_hosts now? expect it does
292 subStr <- etcFileBS `hasSubStr` "/var/cache/kiki/ssh_known_hosts" 291 subStr <- etcFile `hasSubStr` "/var/cache/kiki/ssh_known_hosts"
293 -- new mtime 292 -- new mtime
294 mtime <- getModificationTime etcFile 293 mtime <- getModificationTime etcFile
295 (lost,gained,bChanged,(subStr0,subStr),compare mtime mtime0) `shouldBe` (1,1,True,(False,True),GT) 294 (lost,gained,bChanged,(subStr0,subStr),compare mtime mtime0) `shouldBe` (1,1,True,(False,True),GT)