diff options
Diffstat (limited to 'spec/lib/gitlab/git/repository_spec.rb')
-rw-r--r-- | spec/lib/gitlab/git/repository_spec.rb | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/spec/lib/gitlab/git/repository_spec.rb b/spec/lib/gitlab/git/repository_spec.rb index 1ddbdda12b5..336bf20d59c 100644 --- a/spec/lib/gitlab/git/repository_spec.rb +++ b/spec/lib/gitlab/git/repository_spec.rb @@ -133,32 +133,10 @@ RSpec.describe Gitlab::Git::Repository, :seed_helper do expect(metadata['ArchivePrefix']).to eq(expected_prefix) end - context 'when :include_lfs_blobs_in_archive feature flag is disabled' do - let(:expected_path) { File.join(storage_path, cache_key, expected_filename) } + it 'sets ArchivePath to the expected globally-unique path' do + expect(expected_path).to include(File.join(repository.gl_repository, SeedRepo::LastCommit::ID)) - before do - stub_feature_flags(include_lfs_blobs_in_archive: false) - end - - it 'sets ArchivePath to the expected globally-unique path' do - # This is really important from a security perspective. Think carefully - # before changing it: https://gitlab.com/gitlab-org/gitlab-foss/issues/45689 - expect(expected_path).to include(File.join(repository.gl_repository, SeedRepo::LastCommit::ID)) - - expect(metadata['ArchivePath']).to eq(expected_path) - end - end - - context 'when :include_lfs_blobs_in_archive feature flag is enabled' do - before do - stub_feature_flags(include_lfs_blobs_in_archive: true) - end - - it 'sets ArchivePath to the expected globally-unique path' do - expect(expected_path).to include(File.join(repository.gl_repository, SeedRepo::LastCommit::ID)) - - expect(metadata['ArchivePath']).to eq(expected_path) - end + expect(metadata['ArchivePath']).to eq(expected_path) end context 'path is set' do @@ -521,7 +499,9 @@ RSpec.describe Gitlab::Git::Repository, :seed_helper do no_tags: true, timeout: described_class::GITLAB_PROJECTS_TIMEOUT, prune: false, - check_tags_changed: false + check_tags_changed: false, + url: nil, + refmap: nil } expect(repository.gitaly_repository_client).to receive(:fetch_remote).with('remote-name', expected_opts) |