summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Crayne <jim.crayne@gmail.com>2016-04-26 06:03:03 -0400
committerJames Crayne <jim.crayne@gmail.com>2016-04-26 06:04:05 -0400
commit75e66cb4dd199e684ebc0a56d4fcc0974f4c8df6 (patch)
treed7b51edf32466875b481c814e8c46827d5dd364d
parentf6fb0fe8298cd6179afbad7c28d5ee82c56c02de (diff)
mostly cosmetic, and some pending tests
-rw-r--r--testkiki/testkiki.hs17
1 files changed, 8 insertions, 9 deletions
diff --git a/testkiki/testkiki.hs b/testkiki/testkiki.hs
index 808900a..db984f5 100644
--- a/testkiki/testkiki.hs
+++ b/testkiki/testkiki.hs
@@ -109,7 +109,7 @@ doTests tkConfig = hspec $ do
109 let c = isInfixOf "New packet" output 109 let c = isInfixOf "New packet" output
110 (b,c) `shouldBe` (True,True) 110 (b,c) `shouldBe` (True,True)
111 111
112 describe "kiki export-secret" $ do 112 describe "kiki export-secret --pems" $ do
113 113
114 t <- runIO $ getPOSIXTime 114 t <- runIO $ getPOSIXTime
115 mtime1 <- runIO $ newIORef (posixSecondsToUTCTime t) 115 mtime1 <- runIO $ newIORef (posixSecondsToUTCTime t)
@@ -161,13 +161,15 @@ doTests tkConfig = hspec $ do
161 hpub <- hash <$> B.readFile (gnuhome </> "pubring.gpg") 161 hpub <- hash <$> B.readFile (gnuhome </> "pubring.gpg")
162 ([ tsec , tpub], hsec == hsec0, hpub == hpub0 ) `shouldBe` ([ tsec0,tpub0],True,True) 162 ([ tsec , tpub], hsec == hsec0, hpub == hpub0 ) `shouldBe` ([ tsec0,tpub0],True,True)
163 163
164 it "warns on stderr when filenames end with .pub" $ do
165 pendingWith "TODO: Not implemented."
164 it "fails when public keys in existing PEM files do not match" $ do 166 it "fails when public keys in existing PEM files do not match" $ do
165 pending 167 pendingWith "TODO: Not implemented."
166 it "updates public pem files to private ones when told to" $ do 168 it "updates public pem files to private ones when told to do so" $ do
167 pending 169 pendingWith "TODO: Not implemented."
168 170
169 171
170 describe "kiki export-public" $ do 172 describe "kiki export-public --pems" $ do
171 173
172 t <- runIO $ getPOSIXTime 174 t <- runIO $ getPOSIXTime
173 mtime1 <- runIO $ newIORef (posixSecondsToUTCTime t) 175 mtime1 <- runIO $ newIORef (posixSecondsToUTCTime t)
@@ -218,7 +220,7 @@ doTests tkConfig = hspec $ do
218 hpub <- hash <$> B.readFile (gnuhome </> "pubring.gpg") 220 hpub <- hash <$> B.readFile (gnuhome </> "pubring.gpg")
219 ([ tsec , tpub], hsec == hsec0, hpub == hpub0 ) `shouldBe` ([ tsec0,tpub0],True,True) 221 ([ tsec , tpub], hsec == hsec0, hpub == hpub0 ) `shouldBe` ([ tsec0,tpub0],True,True)
220 222
221 it "creates public PEM files smaller than exported private PEMs" $ do 223 it "always makes strictly smaller files than export-secret" $ do
222 let cfg' = appendpaths tkConfig "3" 224 let cfg' = appendpaths tkConfig "3"
223 home = chroot cfg' </> "root" 225 home = chroot cfg' </> "root"
224 gnuhome = home </> ".gnupg" 226 gnuhome = home </> ".gnupg"
@@ -232,9 +234,6 @@ doTests tkConfig = hspec $ do
232 let compares = zipWith (<) lengthsPub lengthsSec 234 let compares = zipWith (<) lengthsPub lengthsSec
233 compares `shouldBe` replicate (length tags) True 235 compares `shouldBe` replicate (length tags) True
234 236
235 it "does not leak secret data from GNUPGHOME keyrings" $ do
236 pending
237
238 -- **** cokiki tests ***** 237 -- **** cokiki tests *****
239 describe "cokiki ssh-client" $ do 238 describe "cokiki ssh-client" $ do
240 it "modifies system ssh configuration to respect /var/cache/kiki/ssh_known_hosts" $ do 239 it "modifies system ssh configuration to respect /var/cache/kiki/ssh_known_hosts" $ do