Skip to content

Commit

Permalink
fix test suite to reflect test module name changes
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Mar 7, 2024
1 parent f9561f9 commit 0af6423
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion lib/datadog/ci/contrib/rspec/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ def run_specs(*)
return result unless test_module && test_session

if result != 0
# TODO: repeating this twice feels clunky, we need to remove test_module API before GA
test_module.failed!
test_session.failed!
else
Expand Down
4 changes: 2 additions & 2 deletions spec/datadog/ci/contrib/cucumber/instrumentation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@

it "creates test module span" do
expect(test_module_span).not_to be_nil
expect(test_module_span.name).to eq(test_command)
expect(test_module_span.name).to eq("cucumber")
expect(test_module_span.service).to eq("jalapenos")
expect(test_module_span).to have_test_tag(:span_kind, "test")
expect(test_module_span).to have_test_tag(:framework, "cucumber")
Expand All @@ -171,7 +171,7 @@

it "connects test span to test session, test module, and test suite" do
expect(first_test_span).to have_test_tag(:test_module_id, test_module_span.id.to_s)
expect(first_test_span).to have_test_tag(:module, test_command)
expect(first_test_span).to have_test_tag(:module, "cucumber")
expect(first_test_span).to have_test_tag(:test_session_id, test_session_span.id.to_s)
expect(first_test_span).to have_test_tag(:test_suite_id, first_test_suite_span.id.to_s)
expect(first_test_span).to have_test_tag(:suite, first_test_suite_span.name)
Expand Down
2 changes: 1 addition & 1 deletion spec/datadog/ci/contrib/minitest/instrumentation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def test_pass_other
expect(test_module_span).not_to be_nil

expect(test_module_span.type).to eq("test_module_end")
expect(test_module_span.name).to eq(test_command)
expect(test_module_span.name).to eq("minitest")

expect(test_module_span).to have_test_tag(:span_kind, "test")
expect(test_module_span).to have_test_tag(:framework, "minitest")
Expand Down
2 changes: 1 addition & 1 deletion spec/datadog/ci/contrib/rspec/instrumentation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ def rspec_session_run(with_failed_test: false, with_shared_test: false)
expect(test_module_span).not_to be_nil

expect(test_module_span.type).to eq("test_module_end")
expect(test_module_span.name).to eq(test_command)
expect(test_module_span.name).to eq("rspec")

expect(test_module_span).to have_test_tag(:span_kind, "test")
expect(test_module_span).to have_test_tag(:framework, "rspec")
Expand Down

0 comments on commit 0af6423

Please sign in to comment.