Skip to content

Commit

Permalink
Merge pull request #4333 from DataDog/poc/more-tests-with-service-con…
Browse files Browse the repository at this point in the history
…tainer

Use service container for tests
  • Loading branch information
TonyCTHsu authored Jan 31, 2025
2 parents cefebdf + bf84366 commit 5255b85
Show file tree
Hide file tree
Showing 10 changed files with 1,328 additions and 207 deletions.
1,252 changes: 1,206 additions & 46 deletions .github/workflows/test.yml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions spec/datadog/core/crashtracking/component_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
let(:agent_base_url) { "http://#{hostname}:#{port}" }

[:fiddle, :signal].each do |trigger|
it "reports crashes via http when app crashes with #{trigger}" do
it "reports crashes via http when app crashes with #{trigger}", skip: ENV['BATCHED_TASKS'] do
fork_expectations = proc do |status:, stdout:, stderr:|
expect(Signal.signame(status.termsig)).to eq('SEGV').or eq('ABRT')
expect(stderr).to include('[BUG] Segmentation fault')
Expand Down Expand Up @@ -269,7 +269,7 @@
# Do nothing, it's ok
end

it 'reports crashes via uds when app crashes with fiddle' do
it 'reports crashes via uds when app crashes with fiddle', skip: ENV['BATCHED_TASKS'] do
fork_expectations = proc do |status:, stdout:, stderr:|
expect(Signal.signame(status.termsig)).to eq('SEGV').or eq('ABRT')
expect(stderr).to include('[BUG] Segmentation fault')
Expand Down
2 changes: 1 addition & 1 deletion spec/datadog/core/environment/execution_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@

context 'when in a Pry session' do
it 'returns true' do
pending('Temporarily skipping for batched tests from Github Actions') if ENV['BATCHED_TASKS']
skip('Temporarily skipping for batched tests from Github Actions') if ENV['BATCHED_TASKS']
Tempfile.create('test') do |f|
f.write(repl_script)
f.close
Expand Down
8 changes: 4 additions & 4 deletions spec/datadog/core/telemetry/component_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
end
end

context 'when in fork' do
context 'when in fork', skip: ENV['BATCHED_TASKS'] do
before { skip 'Fork not supported on current platform' unless Process.respond_to?(:fork) }

it do
Expand Down Expand Up @@ -169,7 +169,7 @@
end
end

context 'when in fork' do
context 'when in fork', skip: ENV['BATCHED_TASKS'] do
before { skip 'Fork not supported on current platform' unless Process.respond_to?(:fork) }

it do
Expand Down Expand Up @@ -209,7 +209,7 @@
end
end

context 'when in fork' do
context 'when in fork', skip: ENV['BATCHED_TASKS'] do
before { skip 'Fork not supported on current platform' unless Process.respond_to?(:fork) }

it do
Expand Down Expand Up @@ -245,7 +245,7 @@
expect(worker).to have_received(:enqueue).with(event)
end

context 'when in fork', skip: !Process.respond_to?(:fork) do
context 'when in fork', skip: !Process.respond_to?(:fork) || ENV['BATCHED_TASKS'] do
it do
telemetry
expect_in_fork do
Expand Down
2 changes: 1 addition & 1 deletion spec/datadog/tracing/contrib/mongodb/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
end
end

context 'secondary client' do
context 'secondary client', skip: ENV['BATCHED_TASKS'] do
around do |example|
without_warnings do
# Reset before and after each example; don't allow global state to linger.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'datadog/tracing/contrib/support/spec_helper'
require_relative '../support/helper'

RSpec.describe 'Server internal tracer heartbeat' do
RSpec.describe 'Server internal tracer heartbeat', skip: ENV['BATCHED_TASKS'] do
include SidekiqServerExpectations

before do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'datadog/tracing/contrib/support/spec_helper'
require_relative '../support/helper'

RSpec.describe 'Server internal tracer' do
RSpec.describe 'Server internal tracer', skip: ENV['BATCHED_TASKS'] do
include SidekiqServerExpectations

before do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'datadog/tracing/contrib/support/spec_helper'
require_relative '../support/helper'

RSpec.describe 'Server internal tracer' do
RSpec.describe 'Server internal tracer', skip: ENV['BATCHED_TASKS'] do
include SidekiqServerExpectations
before do
unless Datadog::Tracing::Contrib::Sidekiq::Integration.compatible_with_server_internal_tracing?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'datadog/tracing/contrib/support/spec_helper'
require_relative '../support/helper'

RSpec.describe 'Server internal tracer' do
RSpec.describe 'Server internal tracer', skip: ENV['BATCHED_TASKS'] do
include SidekiqServerExpectations

before do
Expand Down
Loading

0 comments on commit 5255b85

Please sign in to comment.