From 6d6a57636f4a383a4f186079aaca35a1c5fddf2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Thu, 12 Sep 2024 20:33:05 +0200 Subject: [PATCH] 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 --- bin/knapsack_pro_rspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/knapsack_pro_rspec b/bin/knapsack_pro_rspec index c6ed4c680..764d95040 100755 --- a/bin/knapsack_pro_rspec +++ b/bin/knapsack_pro_rspec @@ -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