Skip to content

Commit

Permalink
add #datadog_unskippable? method to RSpec::Core::Example
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Dec 4, 2024
1 parent 64f1517 commit ee52609
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/datadog/ci/contrib/rspec/example.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def run(*args)
},
service: datadog_configuration[:service_name]
) do |test_span|
test_span&.itr_unskippable! if metadata[CI::Ext::Test::ITR_UNSKIPPABLE_OPTION]
test_span&.itr_unskippable! if datadog_unskippable?

metadata[:skip] = CI::Ext::Test::ITR_TEST_SKIP_REASON if test_span&.skipped_by_itr?

Expand Down Expand Up @@ -151,6 +151,10 @@ def datadog_test_parameters
)
end

def datadog_unskippable?
!!metadata[CI::Ext::Test::ITR_UNSKIPPABLE_OPTION]
end

def test_visibility_component
Datadog.send(:components).test_visibility
end
Expand Down
1 change: 1 addition & 0 deletions sig/datadog/ci/contrib/rspec/example.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module Datadog
def datadog_test_name: () -> String
def datadog_test_suite_name: () -> String
def datadog_test_parameters: () -> String
def datadog_unskippable?: () -> bool
end
end
end
Expand Down

0 comments on commit ee52609

Please sign in to comment.