Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Nov 2, 2023
1 parent 787752e commit 1ea75fb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 79 deletions.
4 changes: 3 additions & 1 deletion lib/datadog/ci.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
require "datadog/core"

module Datadog
# Public API for Datadog CI visibility
# Datadog CI visibility public API.
#
# @public_api
module CI
class << self
def trace_test(test_name, service_name: nil, operation_name: "test", tags: {}, &block)
Expand Down
4 changes: 4 additions & 0 deletions lib/datadog/ci/span.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
module Datadog
# Public API for Datadog CI visibility
module CI
# Represents a single part of a test run.
# Could be a session, suite, test, or any custom span.
#
# @public_api
class Span
attr_reader :tracer_span

Expand Down
77 changes: 0 additions & 77 deletions spec/datadog/ci/recorder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -197,81 +197,4 @@
it { is_expected.to be(ci_span) }
end
end

# context "with environment runtime information" do
# context "for the architecture platform" do
# subject(:tag) do
# set_tags!
# span_op.get_tag(Datadog::CI::Ext::Test::TAG_OS_ARCHITECTURE)
# end

# it { is_expected.to eq("x86_64").or eq("i686").or eq("aarch64").or start_with("arm") }
# end

# context "for the OS platform" do
# subject(:tag) do
# set_tags!
# span_op.get_tag(Datadog::CI::Ext::Test::TAG_OS_PLATFORM)
# end

# context "with Linux", if: PlatformHelpers.linux? do
# it { is_expected.to start_with("linux") }
# end

# context "with Mac OS", if: PlatformHelpers.mac? do
# it { is_expected.to start_with("darwin") }
# end

# it "returns a valid string" do
# is_expected.to be_a(String)
# end
# end

# context "for the runtime name" do
# subject(:tag) do
# set_tags!
# span_op.get_tag(Datadog::CI::Ext::Test::TAG_RUNTIME_NAME)
# end

# context "with MRI", if: PlatformHelpers.mri? do
# it { is_expected.to eq("ruby") }
# end

# context "with JRuby", if: PlatformHelpers.jruby? do
# it { is_expected.to eq("jruby") }
# end

# context "with TruffleRuby", if: PlatformHelpers.truffleruby? do
# it { is_expected.to eq("truffleruby") }
# end

# it "returns a valid string" do
# is_expected.to be_a(String)
# end
# end

# context "for the runtime version" do
# subject(:tag) do
# set_tags!
# span_op.get_tag(Datadog::CI::Ext::Test::TAG_RUNTIME_VERSION)
# end

# context "with MRI", if: PlatformHelpers.mri? do
# it { is_expected.to match(/^[23]\./) }
# end

# context "with JRuby", if: PlatformHelpers.jruby? do
# it { is_expected.to match(/^9\./) }
# end

# context "with TruffleRuby", if: PlatformHelpers.truffleruby? do
# it { is_expected.to match(/^2\d\./) }
# end

# it "returns a valid string" do
# is_expected.to be_a(String)
# end
# end
# end
# end
end
2 changes: 1 addition & 1 deletion spec/datadog/ci/span_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
context "when tags are provided" do
let(:tags) { {"foo" => "bar"} }

it "sets provided tags as well as runtime tags" do
it "sets provided tags along with default tag and environment tag" do
# default tags
expect(tracer_span).to receive(:set_tag).with("span.kind", "test")

Expand Down

0 comments on commit 1ea75fb

Please sign in to comment.