12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/datadog/ci/contrib/minitest/hooks.rb', line 12
def before_setup
super
return unless configuration[:enabled]
test_name = "#{class_name}##{name}"
path, = method(name).source_location
test_suite = Pathname.new(path.to_s).relative_path_from(Pathname.pwd).to_s
CI.start_test(
test_name,
tags: {
CI::Ext::Test::TAG_FRAMEWORK => Ext::FRAMEWORK,
CI::Ext::Test::TAG_FRAMEWORK_VERSION => CI::Contrib::Minitest::Integration.version.to_s,
CI::Ext::Test::TAG_TYPE => Ext::TEST_TYPE,
CI::Ext::Test::TAG_SUITE => test_suite
},
service_name: configuration[:service_name],
operation_name: configuration[:operation_name]
)
end
|