Exclude irrelevant Consul Democracy tests in knapsack
In a fork of Consul Democracy, people can use the `:consul` task on a
test that is relevant in the original Consul Democracy but doesn't apply
to them due to their custom changes. So we're excluding tests with this
tag when running the test suite.
Knapsack 7, which we adopted in commit 070cb3185, changed the way to
exclude these tags in RSpec when using Queue Mode [1]. It now ignores
the `filter_run_excluding` option, so we have to pass the argument
directly to the knapsack task.
We're still keeping the `filter_run_excluding` option so it's used when
running the tests on a development machine. The downside, of course, is
that now we have duplicate code.
[1] https://github.com/KnapsackPro/knapsack_pro-ruby/blob/master/CHANGELOG.md#700
This commit is contained in:
@@ -4,7 +4,7 @@ if [ "$KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC" = "" ]; then
|
||||
KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC=disabled-for-fork \
|
||||
KNAPSACK_PRO_MAX_REQUEST_RETRIES=0 \
|
||||
KNAPSACK_PRO_CI_NODE_RETRY_COUNT=0 \
|
||||
bundle exec rake knapsack_pro:queue:rspec
|
||||
bundle exec rake "knapsack_pro:queue:rspec[--tag ~consul]"
|
||||
else
|
||||
bundle exec rake knapsack_pro:queue:rspec
|
||||
bundle exec rake "knapsack_pro:queue:rspec[--tag ~consul]"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user