Class: Datadog::CI::ReadonlyTestSession

Inherits:
TestSession show all
Defined in:
lib/datadog/ci/readonly_test_session.rb

Instance Attribute Summary collapse

Attributes inherited from TestSession

#distributed, #estimated_total_tests_count

Attributes inherited from Span

#tracer_span

Instance Method Summary collapse

Methods inherited from TestSession

#ci_job_name, #ci_provider, #code_coverage?, #git_commit_message, #skipping_tests?, #test_command

Methods inherited from ConcurrentSpan

#get_tag, #set_tags, #synchronize

Methods inherited from Span

#clear_tag, #failed!, #failed?, #get_metric, #get_tag, #git_branch, #git_commit_sha, #git_repository_url, #os_architecture, #os_platform, #os_version, #passed!, #passed?, #runtime_name, #runtime_version, #set_default_tags, #set_environment_runtime_tags, #set_tags, #skipped!, #skipped?, #source_file, #to_s, #trace_id, #type, #undefined?

Constructor Details

#initialize(test_session) ⇒ ReadonlyTestSession

Returns a new instance of ReadonlyTestSession.



9
10
11
12
13
14
# File 'lib/datadog/ci/readonly_test_session.rb', line 9

def initialize(test_session)
  @id = test_session.id
  @name = test_session.name
  @inheritable_tags = test_session.inheritable_tags
  @service = test_session.service
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



16
17
18
# File 'lib/datadog/ci/readonly_test_session.rb', line 16

def id
  @id
end

#inheritable_tagsObject (readonly)

Returns the value of attribute inheritable_tags.



16
17
18
# File 'lib/datadog/ci/readonly_test_session.rb', line 16

def inheritable_tags
  @inheritable_tags
end

#nameObject (readonly)

Returns the value of attribute name.



16
17
18
# File 'lib/datadog/ci/readonly_test_session.rb', line 16

def name
  @name
end

#serviceObject (readonly)

Returns the value of attribute service.



16
17
18
# File 'lib/datadog/ci/readonly_test_session.rb', line 16

def service
  @service
end

Instance Method Details

#finishObject



18
19
20
# File 'lib/datadog/ci/readonly_test_session.rb', line 18

def finish
  raise "ReadonlyTestSession cannot be finished"
end

#set_metric(key, value) ⇒ Object



26
27
28
# File 'lib/datadog/ci/readonly_test_session.rb', line 26

def set_metric(key, value)
  raise "ReadonlyTestSession cannot be modified"
end

#set_tag(key, value) ⇒ Object



22
23
24
# File 'lib/datadog/ci/readonly_test_session.rb', line 22

def set_tag(key, value)
  raise "ReadonlyTestSession cannot be modified"
end