Skip to content

Commit

Permalink
rename CIIntake to CiTestCycle
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Oct 24, 2023
1 parent 3005a8c commit d303a9e
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions lib/datadog/ci/transport/api/builder.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require_relative "ci_intake"
require_relative "ci_test_cycle"
require_relative "evp_proxy"

module Datadog
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:)
Expand Down
2 changes: 1 addition & 1 deletion sig/datadog/ci/transport/api/builder.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion spec/datadog/ci/configuration/components_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions spec/datadog/ci/transport/api/builder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down

0 comments on commit d303a9e

Please sign in to comment.