diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /spec/lib/gitlab/git/repository_spec.rb | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
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) |