setup

package
v0.0.0-...-54693ff Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	APIServerURL      = utils.RequiredEnv("TESTS_API_SERVER_URL", "e.g. https://api.great-innovations.dev")
	SandboxTemplateID = utils.RequiredEnv("TESTS_SANDBOX_TEMPLATE_ID", "e.g. base")
	APIKey            = utils.RequiredEnv("TESTS_E2B_API_KEY", "your Team API key")
	AccessToken       = utils.RequiredEnv("TESTS_E2B_ACCESS_TOKEN", "your Access token")

	TeamID = os.Getenv("TESTS_SANDBOX_TEAM_ID")
	UserID = os.Getenv("TESTS_SANDBOX_USER_ID")

	OrchestratorHost = os.Getenv("TESTS_ORCHESTRATOR_HOST")
	EnvdProxy        = os.Getenv("TESTS_ENVD_PROXY")
)

Functions

func GetAPIClient

func GetAPIClient() *api.ClientWithResponses

func SetAccessTokenHeader

func SetAccessTokenHeader(tb testing.TB, header http.Header, accessToken string)

func SetSandboxHeader

func SetSandboxHeader(tb testing.TB, header http.Header, sandboxID string)

func SetUserHeader

func SetUserHeader(tb testing.TB, header http.Header, user string)

func WithAPIKey

func WithAPIKey(apiKey ...string) func(ctx context.Context, req *http.Request) error

func WithAccessToken

func WithAccessToken() func(ctx context.Context, req *http.Request) error

func WithEnvdAccessToken

func WithEnvdAccessToken(tb testing.TB, accessToken string) func(ctx context.Context, req *http.Request) error

func WithSandbox

func WithSandbox(tb testing.TB, sandboxID string) func(context.Context, *http.Request) error

func WithTeamID

func WithTeamID(teamID ...string) func(ctx context.Context, req *http.Request) error

func WithTestsUserAgent

func WithTestsUserAgent() api.RequestEditorFn

func WithUserAgent

func WithUserAgent(userAgent string) api.RequestEditorFn

Types

type Database

type Database struct {
	Db     *client.Client
	AuthDb *authdb.Client
}

func GetTestDBClient

func GetTestDBClient(tb testing.TB) *Database

type EnvdClient

type EnvdClient struct {
	HTTPClient       *envd.ClientWithResponses
	FilesystemClient filesystemconnect.FilesystemClient
	ProcessClient    processconnect.ProcessClient
}

func GetEnvdClient

func GetEnvdClient(tb testing.TB, _ context.Context) *EnvdClient

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL