From bf0ec00996c37992e101fd4348f205a3ce851f6c Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Wed, 31 Jan 2018 10:30:06 -0600 Subject: Expand QA spec file paths to allow running bin/qa from anywhere --- qa/qa/scenario/test/instance.rb | 7 ++++++- qa/qa/specs/runner.rb | 2 +- qa/spec/scenario/test/instance_spec.rb | 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/qa/qa/scenario/test/instance.rb b/qa/qa/scenario/test/instance.rb index 993bbd723a3..0af9afd1ea4 100644 --- a/qa/qa/scenario/test/instance.rb +++ b/qa/qa/scenario/test/instance.rb @@ -22,7 +22,12 @@ module QA Specs::Runner.perform do |specs| specs.tty = true 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 diff --git a/qa/qa/specs/runner.rb b/qa/qa/specs/runner.rb index 3f7b75df986..752e3e60b8c 100644 --- a/qa/qa/specs/runner.rb +++ b/qa/qa/specs/runner.rb @@ -8,7 +8,7 @@ module QA def initialize @tty = false @tags = [] - @files = ['qa/specs/features'] + @files = [File.expand_path('./features', __dir__)] end def perform diff --git a/qa/spec/scenario/test/instance_spec.rb b/qa/spec/scenario/test/instance_spec.rb index 1824db54c9b..bd09c28e924 100644 --- a/qa/spec/scenario/test/instance_spec.rb +++ b/qa/spec/scenario/test/instance_spec.rb @@ -29,7 +29,8 @@ describe QA::Scenario::Test::Instance do it 'should call runner with default arguments' do 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 -- cgit v1.2.1 From 4067b64d3efe32180ee07a8e921f241a9de1eb5e Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Wed, 31 Jan 2018 10:38:02 -0600 Subject: Revert "Merge branch 'update-qa-docs-with-directory-req' into 'master'" This reverts commit e6579d82cb87ca5cb94639851482f48a73a2b74f, reversing changes made to afcd9fc7f415dc5a8794ad1ef2498baee08aa825. --- qa/README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/qa/README.md b/qa/README.md index b937dc4c7a0..3c1b61900d9 100644 --- a/qa/README.md +++ b/qa/README.md @@ -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 `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 ``` -- cgit v1.2.1