Files
grecia/bin/knapsack_pro_rspec
Javi Martín 6d6a57636f 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
2024-09-19 13:38:31 +02:00

11 lines
415 B
Bash
Executable File

#!/bin/bash
if [ "$KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC" = "" ]; then
KNAPSACK_PRO_ENDPOINT=https://api-disabled-for-fork.knapsackpro.com \
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[--tag ~consul]"
else
bundle exec rake "knapsack_pro:queue:rspec[--tag ~consul]"
fi