Commit b58151bb authored by Dylan Griffith's avatar Dylan Griffith

Merge branch '5870-elasticsearch-id-is-too-long-must-be-no-longer-than-512-bytes' into 'master'

Support Indexing Blobs with paths longer than 512 bytes

See merge request gitlab-org/gitlab!37834
parents 49f00de2 3b297a95
---
title: Support Indexing files in Elasticsearch with paths longer than 512 bytes
merge_request: 37834
author:
type: fixed
......@@ -373,6 +373,21 @@ RSpec.describe Gitlab::Elastic::Indexer do
end
end
context 'when a file path is larger than elasticsearch max size of 512 bytes', :elastic do
let(:long_path) { "#{'a' * 1000}_file.txt" }
before do
project.repository.create_file(user, long_path, 'Large path file contents', message: 'long_path.txt', branch_name: 'master')
index_repository(project)
end
it 'indexes the file' do
files = indexed_file_paths_for('file')
expect(files).to include(long_path)
end
end
def expect_popen
expect(Gitlab::Popen).to receive(:popen)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment