From d8fe87bbc40c15b88439cfe78349d1792e078901 Mon Sep 17 00:00:00 2001 From: James Crayne Date: Tue, 26 Apr 2016 00:42:20 -0400 Subject: Fix tests: --homedir is relative to --chroot Also, increase time stamp resolution to the second. --- testkiki/testkiki.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'testkiki') diff --git a/testkiki/testkiki.hs b/testkiki/testkiki.hs index 452d298..19c54dc 100644 --- a/testkiki/testkiki.hs +++ b/testkiki/testkiki.hs @@ -35,7 +35,7 @@ main = do cwd <- getCurrentDirectory let chomp x = takeWhile (/='\n') x date <- maybe (return "") - (\x -> chomp <$> readProcess x ["+%Y-%m-%d-%H%M"] "") =<< findExecutable "date" + (\x -> chomp <$> readProcess x ["+%Y-%m-%d-%H%M%S"] "") =<< findExecutable "date" let tdir = cwd "TESTS" date @@ -77,13 +77,13 @@ doTests tkConfig = hspec $ do cfg = appendpaths tkConfig "0" (isInfixOf "New packet" <$> kiki ["init"]) `shouldReturn` True - it "creates parent directories with --gnupghome" $ do - let home = chroot cfg "home" "tester" + it "creates parent directories with --homedir" $ do + let home = "home" "tester" cfg = appendpaths tkConfig "1" kiki = kiki'Env'And'HomeArg cfg { gnupghome = home ".gnupg" } output <- kiki ["init"] - b <- doesDirectoryExist home + b <- doesDirectoryExist (chroot cfg home) -- isInfixOf "New packet" output b `shouldBe` True -- cgit v1.2.3