Skip to content

Commit 146a6ed

Browse files
pdamalclocke
authored andcommitted
API endpoint configurable with BUILDKITE_ANALYTICS_ENDPOINT
Useful for testing.
1 parent 6f3b5e1 commit 146a6ed

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/buildkite/test_collector.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def self.configure(hook:, token: nil, url: nil, tracing_enabled: true, artifact_
4848
end
4949

5050
self.api_token = (token || ENV["BUILDKITE_ANALYTICS_TOKEN"])&.strip
51-
self.url = url || DEFAULT_URL
51+
self.url = url || ENV["BUILDKITE_ANALYTICS_ENDPOINT"] || DEFAULT_URL
5252
self.tracing_enabled = tracing_enabled
5353
self.artifact_path = artifact_path
5454
self.env = env

spec/test_collector/tracer_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@
140140
let(:min_duration) { 2.0 }
141141
before do
142142
fake_env("BUILDKITE_ANALYTICS_TOKEN", "token")
143+
fake_env("BUILDKITE_ANALYTICS_ENDPOINT", nil)
143144
fake_env("BUILDKITE_ANALYTICS_TRACE_MIN_MS", (min_duration * 1000).to_s)
144145
Buildkite::TestCollector.configure(hook: :minitest)
145146
end

0 commit comments

Comments
 (0)