Skip to content

Commit 1e58013

Browse files
authored
Merge pull request #4544 from DataDog/repro-core-loading
APMS-15322 Reproducer for loading core only and configuring the library
2 parents 23fb133 + 871297f commit 1e58013

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

lib/datadog/tracing/component.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
require_relative 'sampling/span/rule_parser'
77
require_relative 'sampling/span/sampler'
88
require_relative 'diagnostics/environment_logger'
9+
require_relative 'contrib/component'
910

1011
module Datadog
1112
module Tracing

spec/loading_spec.rb

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,25 @@
3838
end
3939
end
4040
end
41+
42+
RSpec.describe 'load core only and configure library' do
43+
let(:code) do
44+
<<-E
45+
if defined?(Datadog)
46+
unless Datadog.constants == [:VERSION]
47+
exit 1
48+
end
49+
end
50+
51+
require 'datadog/core'
52+
53+
Datadog.configure do
54+
end
55+
E
56+
end
57+
58+
it 'configures successfully' do
59+
rv = system("ruby -e #{Shellwords.shellescape(code)}")
60+
expect(rv).to be true
61+
end
62+
end

0 commit comments

Comments
 (0)