diff options
| author | Suhaib Mujahid <[email protected]> | 2020-11-02 21:36:20 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-11-02 18:36:20 -0800 |
| commit | c3664193f3c05bd6ae48f153c6c41cd7d7a3d98b (patch) | |
| tree | 554de5613b352af18e71821d84e0a747b8023ed8 /settings_test.go | |
| parent | ad3ec3664d54779c4c2e49e41f85e886fbff343c (diff) | |
feat: Implement an option to control hash verification (#671)
Add a binding to enable/disable hash verification using the `GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION` option.
Change type: #minor
Diffstat (limited to 'settings_test.go')
| -rw-r--r-- | settings_test.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/settings_test.go b/settings_test.go index 150ee7c..47eb711 100644 --- a/settings_test.go +++ b/settings_test.go @@ -57,6 +57,14 @@ func TestEnableCaching(t *testing.T) { checkFatal(t, err) } +func TestEnableStrictHashVerification(t *testing.T) { + err := EnableStrictHashVerification(false) + checkFatal(t, err) + + err = EnableStrictHashVerification(true) + checkFatal(t, err) +} + func TestCachedMemory(t *testing.T) { current, allowed, err := CachedMemory() checkFatal(t, err) @@ -80,4 +88,4 @@ func TestSetCacheMaxSize(t *testing.T) { // revert to default 256MB err = SetCacheMaxSize(256 * 1024 * 1024) checkFatal(t, err) -}
\ No newline at end of file +} |
