Skip to content

Commit 7d6c524

Browse files
committed
tests
1 parent 65b0a10 commit 7d6c524

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

spec/datadog/appsec/contrib/rack/integration_test_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@
299299
let(:remote_boot_timeout) { 1.0 }
300300
let(:route) { '/success/' }
301301

302-
let(:component) { Datadog::Core::Remote.active_remote }
302+
let(:component) { Datadog.send(:components).remote }
303303
let(:worker) { component.instance_eval { @worker } }
304304
let(:client) { double('Client') }
305305
let(:transport_v7) { double('Transport') }

spec/datadog/tracing/contrib/rack/integration_test_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
let(:remote_boot_timeout) { 1.0 }
152152
let(:route) { '/success/' }
153153

154-
let(:component) { Datadog::Core::Remote.active_remote }
154+
let(:component) { Datadog.send(:components).remote }
155155
let(:worker) { component.instance_eval { @worker } }
156156
let(:client) { double('Client') }
157157
let(:transport_v7) { double('Transport') }

spec/datadog/tracing/contrib/suite/integration_spec.rb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ def build(*dynamic_configurations)
9494
}.to_json
9595
end
9696

97+
let(:active_remote) do
98+
Datadog.send(:components).remote
99+
end
100+
97101
context 'with dynamic configuration data' do
98102
let(:dynamic_configuration) { new_dynamic_configuration(product, data) }
99103
let(:data) { { 'lib_config' => lib_config } }
@@ -109,7 +113,7 @@ def build(*dynamic_configurations)
109113
let(:tracing_header_tags) { [{ 'header' => 'test-header', 'tag_name' => '' }] }
110114

111115
it 'overrides the local values' do
112-
Datadog::Core::Remote.active_remote.barrier(:once)
116+
active_remote.barrier(:once)
113117

114118
expect(Datadog.configuration.tracing.sampling.default_rate).to be_nil
115119
expect(Datadog.configuration.tracing.log_injection).to eq(true)
@@ -128,7 +132,7 @@ def build(*dynamic_configurations)
128132
let(:empty_data) { { 'lib_config' => {} } }
129133

130134
it 'restore the local values' do
131-
Datadog::Core::Remote.active_remote.barrier(:once)
135+
active_remote.barrier(:once)
132136

133137
update_config
134138

@@ -200,7 +204,7 @@ def build(*dynamic_configurations)
200204

201205
it 'changes default sampling rate and sampling decision' do
202206
# Before
203-
Datadog::Core::Remote.active_remote.barrier(:once)
207+
active_remote.barrier(:once)
204208
tracer.trace('test') {}
205209

206210
expect(trace.rule_sample_rate).to be_nil
@@ -236,7 +240,7 @@ def build(*dynamic_configurations)
236240

237241
it 'changes disables log injection' do
238242
# Before
239-
Datadog::Core::Remote.active_remote.barrier(:once)
243+
active_remote.barrier(:once)
240244
expect(Datadog.configuration.tracing.log_injection).to eq(true)
241245

242246
tracer.trace('test') { logger.error('test-log') }

0 commit comments

Comments
 (0)