Skip to content

Commit

Permalink
add expectations that environment tags are not collected when running…
Browse files Browse the repository at this point in the history
… multiple examples
  • Loading branch information
anmarchenko committed Nov 7, 2023
1 parent fea20a4 commit f021d49
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/datadog/ci/contrib/cucumber/instrumentation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ def do_execute
end

it "creates spans for each scenario and step" do
expect(Datadog::CI::Ext::Environment).to receive(:tags).never

expect(kernel).to receive(:exit).with(0)

do_execute
Expand Down
2 changes: 2 additions & 0 deletions spec/datadog/ci/contrib/minitest/instrumentation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ def test_foo
end

it "creates spans for several tests" do
expect(Datadog::CI::Ext::Environment).to receive(:tags).never

num_tests = 20

klass = Class.new(Minitest::Test) do
Expand Down
2 changes: 2 additions & 0 deletions spec/datadog/ci/contrib/rspec/instrumentation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ def with_new_rspec_environment
end

it "creates spans for several examples" do
expect(Datadog::CI::Ext::Environment).to receive(:tags).never

num_examples = 20
with_new_rspec_environment do
RSpec.describe "many tests" do
Expand Down

0 comments on commit f021d49

Please sign in to comment.