setup

package
v0.0.0-...-336e11a Latest Latest
Warning

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

Go to latest
Published: May 22, 2026 License: Apache-2.0 Imports: 19 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")

	SupabaseJWTSecret = os.Getenv("TESTS_SUPABASE_JWT_SECRET")

	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 WithCustomAccessToken

func WithCustomAccessToken(accessToken string) 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 WithSupabaseTeam

func WithSupabaseTeam(t *testing.T, teamID ...string) func(ctx context.Context, req *http.Request) error

func WithSupabaseToken

func WithSupabaseToken(t *testing.T, userID ...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