diff options
| author | Lin Jen-Shin <godfat@godfat.org> | 2017-08-08 19:05:40 +0800 |
|---|---|---|
| committer | Lin Jen-Shin <godfat@godfat.org> | 2017-08-08 19:10:46 +0800 |
| commit | d831e8e1d06c11e9dc9c0c36767b005a3b86a308 (patch) | |
| tree | 006f43816dd690c6d2aa4e7d9f0ee24c9bf3d9bf /spec/support | |
| parent | b8ba0efed017b79647421d5ac38c539096b319cc (diff) | |
| download | gitlab-ce-d831e8e1d06c11e9dc9c0c36767b005a3b86a308.tar.gz | |
Add a test to show that threshold 40 would corrupt35098-raise-encoding-confidence-threshold
If we set `ENCODING_CONFIDENCE_THRESHOLD` to 40,
this test case would not pass. If we raise to 50,
this would pass.
Note that if in the future rugged didn't return
corrupt data, this would be less relevant. But still
icu recommend the threshold to be 50, we should just
stick with 50.
Diffstat (limited to 'spec/support')
| -rw-r--r-- | spec/support/test_env.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/support/test_env.rb b/spec/support/test_env.rb index e059c9620ab..1e39f80699c 100644 --- a/spec/support/test_env.rb +++ b/spec/support/test_env.rb @@ -250,6 +250,14 @@ module TestEnv "#{forked_repo_path}_bare" end + def with_empty_bare_repository(name = nil) + path = Rails.root.join('tmp/tests', name || 'empty-bare-repository').to_s + + yield(Rugged::Repository.init_at(path, :bare)) + ensure + FileUtils.rm_rf(path) + end + private def factory_repo_path |
