Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Aug 28, 2024
1 parent a503ec2 commit 8171ad4
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions spec/datadog/ci/test_optimisation/component_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
end

it_behaves_like "emits telemetry metric", :inc, Datadog::CI::Ext::Telemetry::METRIC_CODE_COVERAGE_FINISHED, 1
it_behaves_like "emits telemetry metric", :distribution, Datadog::CI::Ext::Telemetry::METRIC_CODE_COVERAGE_FILES, 5.0
it_behaves_like "emits telemetry metric", :distribution, Datadog::CI::Ext::Telemetry::METRIC_CODE_COVERAGE_FILES, 6.0
end

context "when test is skipped" do
Expand All @@ -252,11 +252,8 @@
it_behaves_like "emits no metric", :inc, Datadog::CI::Ext::Telemetry::METRIC_CODE_COVERAGE_IS_EMPTY
end

context "when test is skipped and coverage is empty" do
context "when test is skipped and coverage is not collected" do
before do
allow_any_instance_of(Datadog::CI::TestOptimisation::Coverage::DDCov).to receive(:stop).and_return(nil)

component.start_coverage(test_span)
test_span.skipped!
end

Expand Down

0 comments on commit 8171ad4

Please sign in to comment.