Documentation
¶
Overview ¶
Package tests provides test utilities for creating test sessions and other test helpers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTestHTTPSClient ¶
GetTestHTTPSClient creates an HTTPS client for integration tests. It reads BRAINTRUST_API_KEY and BRAINTRUST_API_URL from environment variables. Uses the fail logger to report errors immediately. Skips the test if running in short mode (-short flag). Fails the test if BRAINTRUST_API_KEY is not set.
func NewSession ¶
NewSession creates a static test session with hardcoded data. This session does not make any network calls or start goroutines. Uses the fail logger if t is provided.
func RandomName ¶
RandomName generates a unique name for tests using the test name and a random suffix. This ensures test resources don't collide when running tests in parallel.
func RandomString ¶
RandomString generates a random string of the specified length
Types ¶
This section is empty.