Skip to content

Commit

Permalink
di fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
p committed Jul 6, 2024
1 parent c82bea0 commit 23c682e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/datadog/di/probe_snapshot_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module DI
# @api private
class ProbeSnapshotClient
def initialize(agent_settings)
@client = Net::HTTP.new(agent_settings.hostname, uri.port)
@client = Net::HTTP.new(agent_settings.hostname, agent_settings.port)
end

def dispatch(path, payload)
Expand Down
7 changes: 7 additions & 0 deletions spec/datadog/di/component_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
context 'when dynamic instrumentation is enabled' do
let(:dynamic_instrumentation_enabled) { true }

before do
allow(agent_settings).to receive(:hostname)
allow(agent_settings).to receive(:port)
allow(agent_settings).to receive(:timeout_seconds).and_return(1)
allow(agent_settings).to receive(:ssl)
end

it 'returns a Datadog::DI::Component instance' do
component = described_class.build(settings, agent_settings)
expect(component).to be_a(described_class)
Expand Down

0 comments on commit 23c682e

Please sign in to comment.