diff --git a/lib/datadog/ci/transport/api/builder.rb b/lib/datadog/ci/transport/api/builder.rb index 2037689b..6dac9291 100644 --- a/lib/datadog/ci/transport/api/builder.rb +++ b/lib/datadog/ci/transport/api/builder.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "ci_intake" +require_relative "ci_test_cycle" require_relative "evp_proxy" module Datadog @@ -13,7 +13,7 @@ def self.build_ci_test_cycle_api(settings) url = settings.ci.agentless_url || "https://#{Ext::Transport::TEST_VISIBILITY_INTAKE_HOST_PREFIX}.#{dd_site}:443" - CIIntake.new(api_key: settings.api_key, url: url) + CiTestCycle.new(api_key: settings.api_key, url: url) end def self.build_evp_proxy_api(agent_settings) diff --git a/lib/datadog/ci/transport/api/ci_intake.rb b/lib/datadog/ci/transport/api/ci_test_cycle.rb similarity index 96% rename from lib/datadog/ci/transport/api/ci_intake.rb rename to lib/datadog/ci/transport/api/ci_test_cycle.rb index 3bd5aa74..7b6219a1 100644 --- a/lib/datadog/ci/transport/api/ci_intake.rb +++ b/lib/datadog/ci/transport/api/ci_test_cycle.rb @@ -7,7 +7,7 @@ module Datadog module CI module Transport module Api - class CIIntake < Base + class CiTestCycle < Base attr_reader :api_key, :http def initialize(api_key:, url:) diff --git a/sig/datadog/ci/transport/api/builder.rbs b/sig/datadog/ci/transport/api/builder.rbs index 2c959713..967236b0 100644 --- a/sig/datadog/ci/transport/api/builder.rbs +++ b/sig/datadog/ci/transport/api/builder.rbs @@ -3,7 +3,7 @@ module Datadog module Transport module Api module Builder - def self.build_ci_test_cycle_api: (untyped settings) -> Datadog::CI::Transport::Api::CIIntake + def self.build_ci_test_cycle_api: (untyped settings) -> Datadog::CI::Transport::Api::CiTestCycle def self.build_evp_proxy_api: (untyped agent_settings) -> Datadog::CI::Transport::Api::EVPProxy end end diff --git a/sig/datadog/ci/transport/api/ci_intake.rbs b/sig/datadog/ci/transport/api/ci_test_cycle.rbs similarity index 94% rename from sig/datadog/ci/transport/api/ci_intake.rbs rename to sig/datadog/ci/transport/api/ci_test_cycle.rbs index f934fb76..c56d3756 100644 --- a/sig/datadog/ci/transport/api/ci_intake.rbs +++ b/sig/datadog/ci/transport/api/ci_test_cycle.rbs @@ -2,7 +2,7 @@ module Datadog module CI module Transport module Api - class CIIntake < Base + class CiTestCycle < Base attr_reader api_key: String attr_reader http: Datadog::CI::Transport::HTTP diff --git a/spec/datadog/ci/configuration/components_spec.rb b/spec/datadog/ci/configuration/components_spec.rb index 5bd67681..730ed93f 100644 --- a/spec/datadog/ci/configuration/components_spec.rb +++ b/spec/datadog/ci/configuration/components_spec.rb @@ -146,7 +146,7 @@ expect(settings.tracing.test_mode).to have_received(:writer_options=) do |options| expect(options[:transport]).to be_kind_of(Datadog::CI::TestVisibility::Transport) - expect(options[:transport].api).to be_kind_of(Datadog::CI::Transport::Api::CIIntake) + expect(options[:transport].api).to be_kind_of(Datadog::CI::Transport::Api::CiTestCycle) expect(options[:shutdown_timeout]).to eq(60) end end diff --git a/spec/datadog/ci/transport/api/builder_spec.rb b/spec/datadog/ci/transport/api/builder_spec.rb index d0e2e64d..07584a22 100644 --- a/spec/datadog/ci/transport/api/builder_spec.rb +++ b/spec/datadog/ci/transport/api/builder_spec.rb @@ -35,7 +35,7 @@ end it "creates CI Intake" do - expect(Datadog::CI::Transport::Api::CIIntake).to receive(:new).with( + expect(Datadog::CI::Transport::Api::CiTestCycle).to receive(:new).with( api_key: "api_key", url: "https://citestcycle-intake.datadoghq.com:443" ) subject @@ -45,7 +45,7 @@ let(:agentless_url) { "http://localhost:5555" } it "configures transport to use intake URL from settings" do - expect(Datadog::CI::Transport::Api::CIIntake).to receive(:new).with( + expect(Datadog::CI::Transport::Api::CiTestCycle).to receive(:new).with( api_key: "api_key", url: "http://localhost:5555" ) subject @@ -56,7 +56,7 @@ let(:dd_site) { "datadoghq.eu" } it "construct intake url using provided host" do - expect(Datadog::CI::Transport::Api::CIIntake).to receive(:new).with( + expect(Datadog::CI::Transport::Api::CiTestCycle).to receive(:new).with( api_key: "api_key", url: "https://citestcycle-intake.datadoghq.eu:443" ) subject diff --git a/spec/datadog/ci/transport/api/ci_intake_spec.rb b/spec/datadog/ci/transport/api/ci_test_cycle_spec.rb similarity index 95% rename from spec/datadog/ci/transport/api/ci_intake_spec.rb rename to spec/datadog/ci/transport/api/ci_test_cycle_spec.rb index a0d7a324..1e3aea0c 100644 --- a/spec/datadog/ci/transport/api/ci_intake_spec.rb +++ b/spec/datadog/ci/transport/api/ci_test_cycle_spec.rb @@ -1,6 +1,6 @@ -require_relative "../../../../../lib/datadog/ci/transport/api/ci_intake" +require_relative "../../../../../lib/datadog/ci/transport/api/ci_test_cycle" -RSpec.describe Datadog::CI::Transport::Api::CIIntake do +RSpec.describe Datadog::CI::Transport::Api::CiTestCycle do subject do described_class.new( api_key: api_key,