Module: Datadog::CI::Utils::TestRun
- Defined in:
- lib/datadog/ci/utils/test_run.rb
Class Method Summary collapse
- .command ⇒ Object
- .custom_configuration(env_tags) ⇒ Object
- .skippable_test_id(test_name, suite, parameters = nil) ⇒ Object
- .test_parameters(arguments: {}, metadata: {}) ⇒ Object
Class Method Details
.command ⇒ Object
7 8 9 10 11 |
# File 'lib/datadog/ci/utils/test_run.rb', line 7 def self.command return @command if defined?(@command) @command = "#{$0} #{ARGV.join(" ")}" end |
.custom_configuration(env_tags) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/datadog/ci/utils/test_run.rb', line 26 def self.custom_configuration() return {} if .nil? res = {} .each do |tag, value| next unless tag.start_with?("test.configuration.") res[tag.sub("test.configuration.", "")] = value end res end |
.skippable_test_id(test_name, suite, parameters = nil) ⇒ Object
13 14 15 |
# File 'lib/datadog/ci/utils/test_run.rb', line 13 def self.skippable_test_id(test_name, suite, parameters = nil) "#{suite}.#{test_name}.#{parameters}" end |
.test_parameters(arguments: {}, metadata: {}) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/datadog/ci/utils/test_run.rb', line 17 def self.test_parameters(arguments: {}, metadata: {}) JSON.generate( { arguments: arguments, metadata: } ) end |