summaryrefslogtreecommitdiff
path: root/Test.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-08-17 12:26:14 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-08-17 13:54:14 -0400
commitda0a1360d7b57d034620338996552752ab873045 (patch)
tree7cd5d994f15ae0d52e18321a129360b9e39a6d7d /Test.hs
parent13ce429b5cbc3036e24613ce85e17af7acd9a480 (diff)
add annex-ignore-command and annex-sync-command configs
Added remote configuration settings annex-ignore-command and annex-sync-command, which are dynamic equivilants of the annex-ignore and annex-sync configurations. For this I needed a new DynamicConfig infrastructure. Its implementation should be as fast as before when there is no dynamic config, and it caches so shell commands are only run once. Note that annex-ignore-command exits nonzero when the remote should be ignored. While that may seem backwards, it allows using the same command for it as for annex-sync-command when you want to disable both. This commit was sponsored by Trenton Cronholm on Patreon.
Diffstat (limited to 'Test.hs')
-rw-r--r--Test.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Test.hs b/Test.hs
index 5f4e829c9..d22896f44 100644
--- a/Test.hs
+++ b/Test.hs
@@ -52,6 +52,7 @@ import qualified Git.Ref
import qualified Git.LsTree
import qualified Git.FilePath
import qualified Annex.Locations
+import qualified Types.GitConfig
import qualified Types.KeySource
import qualified Types.Backend
import qualified Types.TrustLevel
@@ -1642,7 +1643,6 @@ test_crypto = do
testscheme "pubkey"
where
gpgcmd = Utility.Gpg.mkGpgCmd Nothing
- encparams = (mempty :: Types.Remote.RemoteConfig, def :: Types.RemoteGitConfig)
testscheme scheme = intmpclonerepo $ whenM (Utility.Path.inPath (Utility.Gpg.unGpgCmd gpgcmd)) $ do
Utility.Gpg.testTestHarness gpgcmd
@? "test harness self-test failed"
@@ -1698,6 +1698,8 @@ test_crypto = do
checkScheme Types.Crypto.Hybrid = scheme == "hybrid"
checkScheme Types.Crypto.PubKey = scheme == "pubkey"
checkKeys cip mvariant = do
+ dummycfg <- Types.GitConfig.dummyRemoteGitConfig
+ let encparams = (mempty :: Types.Remote.RemoteConfig, dummycfg)
cipher <- Crypto.decryptCipher gpgcmd encparams cip
files <- filterM doesFileExist $
map ("dir" </>) $ concatMap (key2files cipher) keys