BuildkiteTestCollector.HttpTransport (buildkite_test_collector v0.3.1)

Handles encoding and transmitting payloads to Buildkite's test analytics API via HTTP.

Summary

Functions

If the payload contains at least the configured batch size (default 500) test results, then send a batch to the API.

Send a Payload to Buildkite's test analytics API.

Functions

maybe_send_batch(payload)

@spec maybe_send_batch(BuildkiteTestCollector.Payload.t()) ::
  {:ok, BuildkiteTestCollector.Payload.t()} | {:error, any()}

If the payload contains at least the configured batch size (default 500) test results, then send a batch to the API.

send(payload)

@spec send(BuildkiteTestCollector.Payload.t()) :: {:ok, map()} | {:error, any()}

Send a Payload to Buildkite's test analytics API.