Skip to content

Commit

Permalink
make test session name tests more stable
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Sep 20, 2024
1 parent 6f756b8 commit 96c32c7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions spec/datadog/ci/test_visibility/component_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,13 @@
end

context "without logical test session name set" do
before do
allow_any_instance_of(Datadog::CI::TestSession).to receive(:ci_job_name).and_return(ci_job_name)
end

context "without CI job name available" do
let(:ci_job_name) { nil }

it "uses the test command" do
subject

Expand All @@ -447,10 +453,6 @@
context "with CI job name available" do
let(:ci_job_name) { "my-ci-job" }

before do
allow_any_instance_of(Datadog::CI::TestSession).to receive(:ci_job_name).and_return(ci_job_name)
end

it "uses the CI job name and test command" do
subject

Expand Down

0 comments on commit 96c32c7

Please sign in to comment.