Class: Datadog::CI::TestTracing::NullComponent

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog/ci/test_tracing/null_component.rb

Overview

Special test visibility component that does not record anything

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize ⇒ NullComponent

Returns a new instance of NullComponent.



12
13
14
15
16
17
# File 'lib/datadog/ci/test_tracing/null_component.rb', line 12

def initialize
  @known_tests = Set.new
  @known_tests_enabled = false
  @context_service_uri = nil
  @local_test_suites_mode = true
end

Instance Attribute Details

#context_service_uri ⇒ Object (readonly)

Returns the value of attribute context_service_uri.



10
11
12
# File 'lib/datadog/ci/test_tracing/null_component.rb', line 10

def context_service_uri
  @context_service_uri
end

#known_tests ⇒ Object (readonly)

Returns the value of attribute known_tests.



10
11
12
# File 'lib/datadog/ci/test_tracing/null_component.rb', line 10

def known_tests
  @known_tests
end

#known_tests_enabled ⇒ Object (readonly)

Returns the value of attribute known_tests_enabled.



10
11
12
# File 'lib/datadog/ci/test_tracing/null_component.rb', line 10

def known_tests_enabled
  @known_tests_enabled
end

#local_test_suites_mode ⇒ Object (readonly)

Returns the value of attribute local_test_suites_mode.



10
11
12
# File 'lib/datadog/ci/test_tracing/null_component.rb', line 10

def local_test_suites_mode
  @local_test_suites_mode
end

Instance Method Details

#active_span ⇒ Object



44
45
# File 'lib/datadog/ci/test_tracing/null_component.rb', line 44

def active_span
end

#active_test ⇒ Object



47
48
# File 'lib/datadog/ci/test_tracing/null_component.rb', line 47

def active_test
end

#active_test_module ⇒ Object



53
54
# File 'lib/datadog/ci/test_tracing/null_component.rb', line 53

def active_test_module
end

#active_test_session ⇒ Object



50
51
# File 'lib/datadog/ci/test_tracing/null_component.rb', line 50

def active_test_session
end

#active_test_suite(test_suite_name) ⇒ Object



56
57
# File 'lib/datadog/ci/test_tracing/null_component.rb', line 56

def active_test_suite(test_suite_name)
end

#client_process? ⇒ Boolean

Returns:

  • (Boolean)


85
86
87
# File 'lib/datadog/ci/test_tracing/null_component.rb', line 85

def client_process?
  false
end

#configure(_, _) ⇒ Object



19
20
# File 'lib/datadog/ci/test_tracing/null_component.rb', line 19

def configure(_, _)
end

#deactivate_test ⇒ Object



59
60
# File 'lib/datadog/ci/test_tracing/null_component.rb', line 59

def deactivate_test
end

#deactivate_test_module ⇒ Object



65
66
# File 'lib/datadog/ci/test_tracing/null_component.rb', line 65

def deactivate_test_module
end

#deactivate_test_session ⇒ Object



62
63
# File 'lib/datadog/ci/test_tracing/null_component.rb', line 62

def deactivate_test_session
end

#deactivate_test_suite(_test_suite_name) ⇒ Object



68
69
# File 'lib/datadog/ci/test_tracing/null_component.rb', line 68

def deactivate_test_suite(_test_suite_name)
end

#itr_enabled? ⇒ Boolean

Returns:

  • (Boolean)


74
75
76
# File 'lib/datadog/ci/test_tracing/null_component.rb', line 74

def itr_enabled?
  false
end

#logical_test_session_name ⇒ Object



82
83
# File 'lib/datadog/ci/test_tracing/null_component.rb', line 82

def logical_test_session_name
end

#restore_state_from_datadog_test_runner ⇒ Object



89
90
91
# File 'lib/datadog/ci/test_tracing/null_component.rb', line 89

def restore_state_from_datadog_test_runner
  false
end

#shutdown! ⇒ Object



71
72
# File 'lib/datadog/ci/test_tracing/null_component.rb', line 71

def shutdown!
end

#start_test_module(test_module_name, service: nil, tags: {}) ⇒ Object



28
29
30
# File 'lib/datadog/ci/test_tracing/null_component.rb', line 28

def start_test_module(test_module_name, service: nil, tags: {})
  skip_tracing
end

#start_test_session(service: nil, tags: {}, estimated_total_tests_count: 0, distributed: nil, local_test_suites_mode: true) ⇒ Object



22
23
24
25
26
# File 'lib/datadog/ci/test_tracing/null_component.rb', line 22

def start_test_session(
  service: nil, tags: {}, estimated_total_tests_count: 0, distributed: nil, local_test_suites_mode: true
)
  skip_tracing
end

#start_test_suite(test_suite_name, service: nil, tags: {}) ⇒ Object



32
33
34
# File 'lib/datadog/ci/test_tracing/null_component.rb', line 32

def start_test_suite(test_suite_name, service: nil, tags: {})
  skip_tracing
end

#trace(span_name, type: "span", tags: {}, &block) ⇒ Object



40
41
42
# File 'lib/datadog/ci/test_tracing/null_component.rb', line 40

def trace(span_name, type: "span", tags: {}, &block)
  skip_tracing(block)
end

#trace_setup_teardown_enabled ⇒ Object



78
79
80
# File 'lib/datadog/ci/test_tracing/null_component.rb', line 78

def trace_setup_teardown_enabled
  false
end

#trace_test(test_name, test_suite_name, service: nil, tags: {}, &block) ⇒ Object



36
37
38
# File 'lib/datadog/ci/test_tracing/null_component.rb', line 36

def trace_test(test_name, test_suite_name, service: nil, tags: {}, &block)
  skip_tracing(block)
end