summaryrefslogtreecommitdiff
path: root/qa/qa
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-24 00:09:24 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-24 00:09:24 +0000
commit2711c26beaca6c3a5a3be4b65e01557faf0185b6 (patch)
tree25d0c2ddb47e87712044884f558a9104c686805f /qa/qa
parent8a7aaf86831d2a556578ae558a4fcab8bb659b20 (diff)
downloadgitlab-ce-2711c26beaca6c3a5a3be4b65e01557faf0185b6.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa/qa')
-rw-r--r--qa/qa/resource/project.rb3
-rw-r--r--qa/qa/runtime/env.rb7
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb22
3 files changed, 31 insertions, 1 deletions
diff --git a/qa/qa/resource/project.rb b/qa/qa/resource/project.rb
index 62e55e18e9b..cb047f81d02 100644
--- a/qa/qa/resource/project.rb
+++ b/qa/qa/resource/project.rb
@@ -8,6 +8,7 @@ module QA
include Events::Project
include Members
+ attr_accessor :repository_storage # requires admin access
attr_writer :initialize_with_readme
attr_writer :auto_devops_enabled
attr_writer :visibility
@@ -116,6 +117,8 @@ module QA
post_body[:path] = name
end
+ post_body[:repository_storage] = repository_storage if repository_storage
+
post_body
end
diff --git a/qa/qa/runtime/env.rb b/qa/qa/runtime/env.rb
index 1c947b0329f..722648857ea 100644
--- a/qa/qa/runtime/env.rb
+++ b/qa/qa/runtime/env.rb
@@ -15,7 +15,8 @@ module QA
# supports the given feature
SUPPORTED_FEATURES = {
git_protocol_v2: 'QA_CAN_TEST_GIT_PROTOCOL_V2',
- admin: 'QA_CAN_TEST_ADMIN_FEATURES'
+ admin: 'QA_CAN_TEST_ADMIN_FEATURES',
+ praefect: 'QA_CAN_TEST_PRAEFECT'
}.freeze
def supported_features
@@ -26,6 +27,10 @@ module QA
ENV['QA_ADDITIONAL_REPOSITORY_STORAGE']
end
+ def praefect_repository_storage
+ ENV['QA_PRAEFECT_REPOSITORY_STORAGE']
+ end
+
def admin_password
ENV['GITLAB_ADMIN_PASSWORD']
end
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb
index c2da5104930..09e11b3587f 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb
@@ -17,6 +17,28 @@ module QA
expect(project).to have_readme_content('This is a test project')
end
end
+
+ it 'pushes to a project using a specific Praefect repository storage', :smoke, :requires_admin, :requires_praefect, quarantine: { issue: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/276', type: :new } do
+ Flow::Login.sign_in_as_admin
+
+ project = Resource::Project.fabricate_via_api! do |storage_project|
+ storage_project.name = 'specific-repository-storage'
+ storage_project.repository_storage = QA::Runtime::Env.praefect_repository_storage
+ end
+
+ Resource::Repository::Push.fabricate! do |push|
+ push.repository_http_uri = project.repository_http_location.uri
+ push.file_name = 'README.md'
+ push.file_content = "# This is a test project named #{project.name}"
+ push.commit_message = 'Add README.md'
+ push.new_branch = true
+ end
+
+ project.visit!
+
+ expect(page).to have_content('README.md')
+ expect(page).to have_content("This is a test project named #{project.name}")
+ end
end
end
end