Sha256: ebe4c5960d6e60d64280f3d51db8ea4df20d7c26557e1deb4098d0e5cf6132ec

Contents?: true

Size: 1.08 KB

Versions: 9

Compression:

Stored size: 1.08 KB

Contents

# frozen_string_literal: true

require_relative "base"
require_relative "../../ext/test"

module Datadog
  module CI
    module TestVisibility
      module Serializers
        class TestSuite < Base
          CONTENT_FIELDS = (["test_session_id", "test_module_id", "test_suite_id"] + Base::CONTENT_FIELDS).freeze

          CONTENT_MAP_SIZE = calculate_content_map_size(CONTENT_FIELDS)

          REQUIRED_FIELDS = (["test_session_id", "test_module_id", "test_suite_id"] + Base::REQUIRED_FIELDS).freeze

          def content_fields
            CONTENT_FIELDS
          end

          def content_map_size
            CONTENT_MAP_SIZE
          end

          def event_type
            Ext::AppTypes::TYPE_TEST_SUITE
          end

          def name
            "#{@span.get_tag(Ext::Test::TAG_FRAMEWORK)}.test_suite"
          end

          def resource
            "#{@span.get_tag(Ext::Test::TAG_FRAMEWORK)}.test_suite.#{@span.get_tag(Ext::Test::TAG_SUITE)}"
          end

          private

          def required_fields
            REQUIRED_FIELDS
          end
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
datadog-ci-1.0.0.beta6 lib/datadog/ci/test_visibility/serializers/test_suite.rb
datadog-ci-1.0.0.beta3 lib/datadog/ci/test_visibility/serializers/test_suite.rb
datadog-ci-1.0.0.beta2 lib/datadog/ci/test_visibility/serializers/test_suite.rb
datadog-ci-1.0.0.beta1 lib/datadog/ci/test_visibility/serializers/test_suite.rb
datadog-ci-0.8.3 lib/datadog/ci/test_visibility/serializers/test_suite.rb
datadog-ci-0.8.2 lib/datadog/ci/test_visibility/serializers/test_suite.rb
datadog-ci-0.8.1 lib/datadog/ci/test_visibility/serializers/test_suite.rb
datadog-ci-0.8.0 lib/datadog/ci/test_visibility/serializers/test_suite.rb
datadog-ci-0.7.0 lib/datadog/ci/test_visibility/serializers/test_suite.rb