Commit f1b6436f authored by Mark Lapierre's avatar Mark Lapierre

Update pull mirroring test to use admin creds

parent e4392000
...@@ -2,10 +2,12 @@ ...@@ -2,10 +2,12 @@
module QA module QA
context 'Create' do context 'Create' do
describe 'Pull mirror a repository over HTTP' do # Use Admin credentials as a workaround for a permissions bug
# See https://gitlab.com/gitlab-org/gitlab/issues/13769
describe 'Pull mirror a repository over HTTP', :requires_admin do
it 'configures and syncs a (pull) mirrored repository with password auth' do it 'configures and syncs a (pull) mirrored repository with password auth' do
Runtime::Browser.visit(:gitlab, Page::Main::Login) Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform(&:sign_in_using_credentials) Page::Main::Login.perform(&:sign_in_using_admin_credentials)
source = Resource::Repository::ProjectPush.fabricate! do |project_push| source = Resource::Repository::ProjectPush.fabricate! do |project_push|
project_push.project_name = 'pull-mirror-source-project' project_push.project_name = 'pull-mirror-source-project'
...@@ -14,7 +16,7 @@ module QA ...@@ -14,7 +16,7 @@ module QA
project_push.commit_message = 'Add README.md' project_push.commit_message = 'Add README.md'
end end
source_project_uri = source.project.repository_http_location.uri source_project_uri = source.project.repository_http_location.uri
source_project_uri.user = Runtime::User.username source_project_uri.user = CGI.escape(Runtime::User.admin_username)
target_project = Resource::Project.fabricate_via_api! do |project| target_project = Resource::Project.fabricate_via_api! do |project|
project.name = 'pull-mirror-target-project' project.name = 'pull-mirror-target-project'
...@@ -28,7 +30,7 @@ module QA ...@@ -28,7 +30,7 @@ module QA
mirror_settings.repository_url = source_project_uri mirror_settings.repository_url = source_project_uri
mirror_settings.mirror_direction = 'Pull' mirror_settings.mirror_direction = 'Pull'
mirror_settings.authentication_method = 'Password' mirror_settings.authentication_method = 'Password'
mirror_settings.password = Runtime::User.password mirror_settings.password = Runtime::User.admin_password
mirror_settings.mirror_repository mirror_settings.mirror_repository
mirror_settings.update source_project_uri mirror_settings.update source_project_uri
end 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