summaryrefslogtreecommitdiff
path: root/testkiki
diff options
context:
space:
mode:
Diffstat (limited to 'testkiki')
-rw-r--r--testkiki/testkiki.hs12
1 files changed, 7 insertions, 5 deletions
diff --git a/testkiki/testkiki.hs b/testkiki/testkiki.hs
index 8b43068..4483368 100644
--- a/testkiki/testkiki.hs
+++ b/testkiki/testkiki.hs
@@ -77,10 +77,11 @@ doTests tkConfig = hspec $ do
77 (isInfixOf "New packet" <$> kiki ["init"]) `shouldReturn` True 77 (isInfixOf "New packet" <$> kiki ["init"]) `shouldReturn` True
78 78
79 it "creates parent directories with --gnupghome" $ do 79 it "creates parent directories with --gnupghome" $ do
80 let kiki = kiki'Env'And'HomeArg tkConfig 80 let home = chroot tkConfig </> "home" </> "tester"
81 { gnupghome = chroot tkConfig </> "home" </> "tester" } 81 kiki = kiki'Env'And'HomeArg tkConfig
82 { gnupghome = home </> ".gnupg" }
82 output <- kiki ["init"] 83 output <- kiki ["init"]
83 b <- doesDirectoryExist (gnupghome tkConfig) 84 b <- doesDirectoryExist home
84 (isInfixOf "New packet" output && b ) `shouldBe` True 85 (isInfixOf "New packet" output && b ) `shouldBe` True
85 86
86 it "creates new secring honoring GNUPGHOME" $ do 87 it "creates new secring honoring GNUPGHOME" $ do
@@ -94,10 +95,11 @@ doTests tkConfig = hspec $ do
94 unsetEnv "GNUPGHOME" 95 unsetEnv "GNUPGHOME"
95 createDirectoryIfMissing True (chroot tkConfig </> "root" </> ".gnupg") 96 createDirectoryIfMissing True (chroot tkConfig </> "root" </> ".gnupg")
96 output <- kiki ["init"] 97 output <- kiki ["init"]
97 let p = (chroot tkConfig </> "root" </> ".gnupg" </> "secring.gpg") 98 let p = (chroot tkConfig </> "root" </> ".gnupg" </> "secring.gpg")
98 putStrLn $ "Does exist? " ++ show p 99 putStrLn $ "Does exist? " ++ show p
99 b <- doesFileExist p 100 b <- doesFileExist p
100 (isInfixOf "New packet" output && b ) `shouldBe` True 101 -- (isInfixOf "New packet" output && b )
102 b `shouldBe` True
101 103
102 describe "kiki export-public" $ do 104 describe "kiki export-public" $ do
103 it "does not modify mtime of GNUPGHOME keyrings" $ do 105 it "does not modify mtime of GNUPGHOME keyrings" $ do