summaryrefslogtreecommitdiff
path: root/qa/qa/scenario/test/instance.rb
blob: 1557fdeff344a7dca88b96883d65ec1b99b6bbcb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
module QA
  module Scenario
    module Test
      ##
      # Run test suite against any GitLab instance,
      # including staging and on-premises installation.
      #
      class Instance < Scenario::Template
        def perform(address, tag, *files)
          Specs::Config.perform do |specs|
            specs.address = address
          end

          ##
          # Perform before hooks, which are different for CE and EE
          #
          Runtime::Release.perform_before_hooks

          Specs::Runner.perform do |specs|
            files = files.any? ? files : 'qa/specs/features'

            specs.rspec('--tty', '--tag', tag.to_s, files)
          end
        end
      end
    end
  end
end