diff --git a/qa/qa/runtime/env.rb b/qa/qa/runtime/env.rb index 1154eaca6a99ddb4589fb0b48e3a0753a5b50e19..0d5738592384f41962ff805aedca56a26d7f5b21 100644 --- a/qa/qa/runtime/env.rb +++ b/qa/qa/runtime/env.rb @@ -103,6 +103,14 @@ def sandbox_name ENV['GITLAB_SANDBOX_NAME'] end + def namespace_name + ENV['GITLAB_NAMESPACE_NAME'] + end + + def auto_devops_project_name + ENV['GITLAB_AUTO_DEVOPS_PROJECT_NAME'] + end + def gcloud_account_key ENV.fetch("GCLOUD_ACCOUNT_KEY") end diff --git a/qa/qa/runtime/namespace.rb b/qa/qa/runtime/namespace.rb index f1c8ef11f946f9654c5e0f259a8e0befe61b32e2..704c65467e08700fb40c5feb3fc45b27e1e49a66 100644 --- a/qa/qa/runtime/namespace.rb +++ b/qa/qa/runtime/namespace.rb @@ -8,7 +8,7 @@ def time end def name - "qa-test-#{time.strftime('%Y-%m-%d-%H-%M-%S')}" + Runtime::Env.namespace_name || "qa-test-#{time.strftime('%Y-%m-%d-%H-%M-%S')}" end def path diff --git a/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb b/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb index 30ec06659735994c50e95e10f3604cd5de694674..b0c277a48c378af6b434d727b486f35f24d3742c 100644 --- a/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb +++ b/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb @@ -16,7 +16,7 @@ module QA Page::Main::Login.act { sign_in_using_credentials } project = Resource::Project.fabricate! do |p| - p.name = 'project-with-autodevops' + p.name = Runtime::Env.auto_devops_project_name || 'project-with-autodevops' p.description = 'Project with Auto Devops' end