summaryrefslogtreecommitdiff
path: root/qa/qa/runtime/namespace.rb
blob: 8d05b38741631ad922f6e1c5c5ca346df40ba192 (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('%d-%m-%Y-%H-%M-%S')
      end

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

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