From 75e66cb4dd199e684ebc0a56d4fcc0974f4c8df6 Mon Sep 17 00:00:00 2001 From: James Crayne Date: Tue, 26 Apr 2016 06:03:03 -0400 Subject: mostly cosmetic, and some pending tests --- testkiki/testkiki.hs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'testkiki') 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 let c = isInfixOf "New packet" output (b,c) `shouldBe` (True,True) - describe "kiki export-secret" $ do + describe "kiki export-secret --pems" $ do t <- runIO $ getPOSIXTime mtime1 <- runIO $ newIORef (posixSecondsToUTCTime t) @@ -161,13 +161,15 @@ doTests tkConfig = hspec $ do hpub <- hash <$> B.readFile (gnuhome "pubring.gpg") ([ tsec , tpub], hsec == hsec0, hpub == hpub0 ) `shouldBe` ([ tsec0,tpub0],True,True) + it "warns on stderr when filenames end with .pub" $ do + pendingWith "TODO: Not implemented." it "fails when public keys in existing PEM files do not match" $ do - pending - it "updates public pem files to private ones when told to" $ do - pending + pendingWith "TODO: Not implemented." + it "updates public pem files to private ones when told to do so" $ do + pendingWith "TODO: Not implemented." - describe "kiki export-public" $ do + describe "kiki export-public --pems" $ do t <- runIO $ getPOSIXTime mtime1 <- runIO $ newIORef (posixSecondsToUTCTime t) @@ -218,7 +220,7 @@ doTests tkConfig = hspec $ do hpub <- hash <$> B.readFile (gnuhome "pubring.gpg") ([ tsec , tpub], hsec == hsec0, hpub == hpub0 ) `shouldBe` ([ tsec0,tpub0],True,True) - it "creates public PEM files smaller than exported private PEMs" $ do + it "always makes strictly smaller files than export-secret" $ do let cfg' = appendpaths tkConfig "3" home = chroot cfg' "root" gnuhome = home ".gnupg" @@ -232,9 +234,6 @@ doTests tkConfig = hspec $ do let compares = zipWith (<) lengthsPub lengthsSec compares `shouldBe` replicate (length tags) True - it "does not leak secret data from GNUPGHOME keyrings" $ do - pending - -- **** cokiki tests ***** describe "cokiki ssh-client" $ do it "modifies system ssh configuration to respect /var/cache/kiki/ssh_known_hosts" $ do -- cgit v1.2.3