summaryrefslogtreecommitdiff
path: root/qa/qa/runtime/namespace.rb
blob: f1c8ef11f946f9654c5e0f259a8e0befe61b32e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module QA
  module Runtime
    module Namespace
      extend self

      def time
        @time ||= Time.now
      end

      def name
        "qa-test-#{time.strftime('%Y-%m-%d-%H-%M-%S')}"
      end

      def path
        "#{sandbox_name}/#{name}"
      end

      def sandbox_name
        Runtime::Env.sandbox_name || 'gitlab-qa-sandbox-group'
      end
    end
  end
end