Documentation ¶
Overview ¶
Package adapters provides helpers for dealing with adapter tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IntegrationTest ¶ added in v0.17.3
func IntegrationTest(t *testing.T, adapterName string, testFunc IntegrationTestFunc)
IntegrationTest tests the given adapter with the given test function. It takes care of setting up all surroundings for the integration test.
func Setup ¶
func Setup[T any](t *testing.T, hf http.HandlerFunc, setupFunc func(dataset string, client *axiom.Client) (T, func())) (T, func())
Setup sets up a test http server that serves the given handler function. It uses the given setup function to retrieve the adapter to be tested that must be configured to talk to the client passed to the setup function.
Types ¶
type IntegrationTestFunc ¶ added in v0.17.3
IntegrationTestFunc is a function that provides a client that is configured with an API token for a unique test dataset. The client should be passed to the adapter to be tested as well as the target dataset.
Click to show internal directories.
Click to hide internal directories.