Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-30 18:07:51 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-30 18:07:51 +0300
commit4e9acbfba3682c552b3de707c535e6257ef41054 (patch)
tree8b1fd5f89ad3f1be68d8944815b13bb7d498e4a6 /spec/features/projects/settings
parent506d6dcd7c787ba71a8a53102f3d4fdb6adcfa5e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/projects/settings')
-rw-r--r--spec/features/projects/settings/repository_settings_spec.rb29
1 files changed, 29 insertions, 0 deletions
diff --git a/spec/features/projects/settings/repository_settings_spec.rb b/spec/features/projects/settings/repository_settings_spec.rb
index 9b956dee089..28a238a5423 100644
--- a/spec/features/projects/settings/repository_settings_spec.rb
+++ b/spec/features/projects/settings/repository_settings_spec.rb
@@ -72,6 +72,21 @@ describe 'Projects > Settings > Repository settings' do
expect(project.remote_mirrors.first.only_protected_branches).to eq(true)
end
+ it 'creates a push mirror that keeps divergent refs', :js do
+ select_direction
+
+ fill_in 'url', with: 'ssh://user@localhost/project.git'
+ fill_in 'Password', with: 'password'
+ check 'Keep divergent refs'
+
+ Sidekiq::Testing.fake! do
+ click_button 'Mirror repository'
+ end
+
+ expect(page).to have_content('Mirroring settings were successfully updated')
+ expect(project.reload.remote_mirrors.first.keep_divergent_refs).to eq(true)
+ end
+
it 'generates an SSH public key on submission', :js do
fill_in 'url', with: 'ssh://user@localhost/project.git'
select 'SSH public key', from: 'Authentication method'
@@ -110,6 +125,20 @@ describe 'Projects > Settings > Repository settings' do
end
end
+ # Removal: https://gitlab.com/gitlab-org/gitlab/-/issues/208828
+ context 'with the `keep_divergent_refs` feature flag disabled' do
+ before do
+ stub_feature_flags(keep_divergent_refs: { enabled: false, thing: project })
+ end
+
+ it 'hides the "Keep divergent refs" option' do
+ visit project_settings_repository_path(project)
+
+ expect(page).not_to have_selector('#keep_divergent_refs')
+ expect(page).not_to have_text('Keep divergent refs')
+ end
+ end
+
context 'repository cleanup settings' do
let(:object_map_file) { Rails.root.join('spec', 'fixtures', 'bfg_object_map.txt') }