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/Rakefile')
-rw-r--r--qa/Rakefile19
1 files changed, 18 insertions, 1 deletions
diff --git a/qa/Rakefile b/qa/Rakefile
index 6f94c63b4de..a8336e087c7 100644
--- a/qa/Rakefile
+++ b/qa/Rakefile
@@ -83,10 +83,27 @@ end
desc "Deletes user's projects"
task :delete_user_projects, [:delete_before, :dry_run] do |_, args|
- QA::Tools::DeleteUserProjects.new(args).run
+ args.with_defaults(delete_before: (Date.today - 1).to_s, dry_run: false)
+ QA::Tools::DeleteUserProjects.new(
+ delete_before: args[:delete_before],
+ dry_run: !!(args[:dry_run] =~ /true|1|y/i)).run
end
desc "Revokes user's personal access tokens"
task :revoke_user_pats, [:revoke_before, :dry_run] do |_, args|
QA::Tools::RevokeUserPersonalAccessTokens.new(args).run
end
+
+desc "Generate group with multiple projects for direct transfer test"
+task :generate_direct_transfer_test_group, [:project_tar_paths, :group_path, :project_copies] do |_, args|
+ QA::Support::GitlabAddress.define_gitlab_address_attribute!
+ QA::Runtime::Browser.configure!
+ QA::Runtime::Scenario.from_env(QA::Runtime::Env.runtime_scenario_attributes)
+
+ numeric_args = { project_copies: Integer(args[:project_copies], exception: false) }.compact
+ string_args = args.to_h
+ .slice(:project_tar_paths, :group_path)
+ .compact_blank
+
+ QA::Tools::GenerateImportTestGroup.new(**string_args, **numeric_args).generate
+end