diff options
-rw-r--r-- | qa/qa/runtime/env.rb | 8 | ||||
-rw-r--r-- | qa/qa/runtime/namespace.rb | 2 | ||||
-rw-r--r-- | qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb | 2 |
3 files changed, 10 insertions, 2 deletions
diff --git a/qa/qa/runtime/env.rb b/qa/qa/runtime/env.rb index 1154eaca6a9..0d573859238 100644 --- a/qa/qa/runtime/env.rb +++ b/qa/qa/runtime/env.rb @@ -103,6 +103,14 @@ module QA 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 f1c8ef11f94..704c65467e0 100644 --- a/qa/qa/runtime/namespace.rb +++ b/qa/qa/runtime/namespace.rb @@ -8,7 +8,7 @@ module QA 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 30ec0665973..b0c277a48c3 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 |