summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/diff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-04 18:08:50 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-04 18:08:50 +0000
commitca05512007cea51e05d3431b2c8bd7228c754370 (patch)
tree5202d429acd68c071445aff9e352379173ec9c0b /spec/lib/gitlab/diff
parent6b833f1e0340e00fdee074da9c42c0d4e07a46d2 (diff)
downloadgitlab-ce-ca05512007cea51e05d3431b2c8bd7228c754370.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/diff')
-rw-r--r--spec/lib/gitlab/diff/highlight_cache_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/lib/gitlab/diff/highlight_cache_spec.rb b/spec/lib/gitlab/diff/highlight_cache_spec.rb
index 218c393c409..c1ec97ae88c 100644
--- a/spec/lib/gitlab/diff/highlight_cache_spec.rb
+++ b/spec/lib/gitlab/diff/highlight_cache_spec.rb
@@ -101,6 +101,13 @@ describe Gitlab::Diff::HighlightCache, :clean_gitlab_redis_cache do
let(:paths) { merge_request.diffs.raw_diff_files.select(&:text?).map(&:file_path) }
end
+ it 'updates memory usage metrics' do
+ expect(described_class.gitlab_redis_diff_caching_memory_usage_bytes)
+ .to receive(:observe).and_call_original
+
+ cache.send(:write_to_redis_hash, diff_hash)
+ end
+
context 'different diff_collections for the same diffable' do
before do
cache.write_if_empty