Skip to content

Commit

Permalink
fix knapsack tests by raising an exception (sic!)
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Jul 29, 2024
1 parent 7c04b8f commit 7ddb104
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
["./spec/datadog/ci/contrib/knapsack_rspec/suite_under_test/some_test_rspec.rb"],
[]
)
# raise to prevent Knapsack from running Kernel.exit(0)
allow(KnapsackPro::Report).to receive(:save_node_queue_to_api).and_raise(ArgumentError)
end

# Yields to a block in a new RSpec global context. All RSpec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ def devnull
["./spec/datadog/ci/contrib/knapsack_rspec_go/suite_under_test/some_test_rspec.rb"],
[]
)

# raise to prevent Knapsack from running Kernel.exit(0)
allow(KnapsackPro::Report).to receive(:save_node_queue_to_api).and_raise(ArgumentError)
end

it "instruments this rspec session" do
Expand Down

0 comments on commit 7ddb104

Please sign in to comment.