Skip to content

Commit

Permalink
rename helper to skip_unless_integration_testing_enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
p committed Oct 1, 2024
1 parent 540c9f0 commit ab3bf66
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion spec/datadog/core/remote/transport/integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
require 'datadog/core/remote/transport/negotiation'

RSpec.describe Datadog::Core::Remote::Transport::HTTP do
integration_test
skip_unless_integration_testing_enabled

describe '.root' do
subject(:transport) { described_class.root(&client_options) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
require 'spec/datadog/tracing/contrib/ethon/support/thread_helpers'

RSpec.describe 'Ethon integration tests' do
integration_test
skip_unless_integration_testing_enabled

context 'with Easy HTTP request' do
subject(:request) do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
require 'spec/datadog/tracing/contrib/ethon/support/thread_helpers'

RSpec.describe Datadog::Tracing::Contrib::Ethon do
integration_test
skip_unless_integration_testing_enabled

before(:context) do
# Ethon will lazily initialize LibCurl,
Expand Down
2 changes: 1 addition & 1 deletion spec/datadog/tracing/contrib/redis/instrumentation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require 'datadog'

RSpec.describe 'Redis instrumentation test' do
integration_test
skip_unless_integration_testing_enabled

let(:test_host) { ENV.fetch('TEST_REDIS_HOST', '127.0.0.1') }
let(:test_port) { ENV.fetch('TEST_REDIS_PORT', 6379).to_i }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
require 'datadog'

RSpec.describe 'Redis integration test' do
integration_test
skip_unless_integration_testing_enabled

before do
use_real_tracer!
Expand Down
2 changes: 1 addition & 1 deletion spec/datadog/tracing/contrib/redis/miniapp_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
require 'datadog'

RSpec.describe 'Redis mini app test' do
integration_test
skip_unless_integration_testing_enabled

before do
Datadog.configure { |c| c.tracing.instrument :redis }
Expand Down
2 changes: 1 addition & 1 deletion spec/datadog/tracing/integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

RSpec.describe 'Tracer integration tests' do
shared_context 'agent-based test' do
integration_test
skip_unless_integration_testing_enabled

before do
# Ensure background Writer worker doesn't wait, making tests faster.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
require 'datadog/core/transport/http/adapters/net'

RSpec.describe 'Adapters::Net tracing integration tests' do
integration_test
skip_unless_integration_testing_enabled

subject(:adapter) { Datadog::Core::Transport::HTTP::Adapters::Net.new(agent_settings) }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
require 'datadog/core/transport/http/adapters/unix_socket'

RSpec.describe 'Adapters::UnixSocket integration tests' do
integration_test
skip_unless_integration_testing_enabled

subject(:adapter) { Datadog::Core::Transport::HTTP::Adapters::UnixSocket.new(**options) }

Expand Down
2 changes: 1 addition & 1 deletion spec/datadog/tracing/transport/http/integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
require 'datadog/tracing/transport/traces'

RSpec.describe 'Datadog::Tracing::Transport::HTTP integration tests' do
integration_test
skip_unless_integration_testing_enabled

describe 'HTTP#default' do
subject(:transport) { Datadog::Tracing::Transport::HTTP.default(&client_options) }
Expand Down
2 changes: 1 addition & 1 deletion spec/support/core_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def supports_value_expectations?
end

module ClassMethods
def integration_test
def skip_unless_integration_testing_enabled
unless ENV['TEST_DATADOG_INTEGRATION']
before(:all) do
skip 'Set TEST_DATADOG_INTEGRATION=1 in environment to run this test'
Expand Down
2 changes: 1 addition & 1 deletion spec/support/test_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module RSpec
module Integration
def self.included(base)
base.class_exec do
integration_test
skip_unless_integration_testing_enabled

include_context 'non-development execution environment'
end
Expand Down

0 comments on commit ab3bf66

Please sign in to comment.