Commit a08fc123 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch 'qa/rs-qa-from-anywhere' into 'master'

Run bin/qa from anywhere

See merge request gitlab-org/gitlab-ce!16833
parents 4457cf9d 4067b64d
...@@ -34,9 +34,6 @@ You can use GitLab QA to exercise tests on any live instance! For example, the ...@@ -34,9 +34,6 @@ You can use GitLab QA to exercise tests on any live instance! For example, the
following call would login to a local [GDK] instance and run all specs in following call would login to a local [GDK] instance and run all specs in
`qa/specs/features`: `qa/specs/features`:
First, `cd` into the `$gdk/gitlab/qa` directory.
The `bin/qa` script expects you to be in the `qa` folder of the app.
``` ```
bin/qa Test::Instance http://localhost:3000 bin/qa Test::Instance http://localhost:3000
``` ```
......
...@@ -22,7 +22,12 @@ module QA ...@@ -22,7 +22,12 @@ module QA
Specs::Runner.perform do |specs| Specs::Runner.perform do |specs|
specs.tty = true specs.tty = true
specs.tags = self.class.focus specs.tags = self.class.focus
specs.files = files.any? ? files : 'qa/specs/features' specs.files =
if files.any?
files
else
File.expand_path('../../specs/features', __dir__)
end
end end
end end
end end
......
...@@ -8,7 +8,7 @@ module QA ...@@ -8,7 +8,7 @@ module QA
def initialize def initialize
@tty = false @tty = false
@tags = [] @tags = []
@files = ['qa/specs/features'] @files = [File.expand_path('./features', __dir__)]
end end
def perform def perform
......
...@@ -29,7 +29,8 @@ describe QA::Scenario::Test::Instance do ...@@ -29,7 +29,8 @@ describe QA::Scenario::Test::Instance do
it 'should call runner with default arguments' do it 'should call runner with default arguments' do
subject.perform("test") subject.perform("test")
expect(runner).to have_received(:files=).with('qa/specs/features') expect(runner).to have_received(:files=)
.with(File.expand_path('../../../qa/specs/features', __dir__))
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment