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:
Diffstat (limited to 'qa/qa/resource/project.rb')
-rw-r--r--qa/qa/resource/project.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/qa/qa/resource/project.rb b/qa/qa/resource/project.rb
index 2db4f4b5f65..59964c5833d 100644
--- a/qa/qa/resource/project.rb
+++ b/qa/qa/resource/project.rb
@@ -7,14 +7,15 @@ module QA
include Members
include Visibility
- attr_accessor :repository_storage, # requires admin access
- :initialize_with_readme,
+ attr_accessor :initialize_with_readme,
:auto_devops_enabled,
:github_personal_access_token,
:github_repository_path,
:gitlab_repository_path,
:personal_namespace
+ attr_reader :repository_storage
+
attributes :id,
:name,
:path,
@@ -70,6 +71,15 @@ module QA
@name = @add_name_uuid ? "#{raw_name}-#{SecureRandom.hex(8)}" : raw_name
end
+ # Sets the project's repository storage
+ # This feature requires admin access so be sure to fabricate the project as an admin user, and add the metadata
+ # `:requires_admin` to the test it's used in.
+ def repository_storage=(name)
+ raise ArgumentError, "Please provide a valid repository storage name" if name.to_s.empty?
+
+ @repository_storage = name
+ end
+
def fabricate!
return if @import