testutils

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package testutils offers utilities for testing against a k6build service

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestEnv

type TestEnv struct {
	// contains filtered or unexported fields
}

TestEnv is a test environment for the provider tests

func NewTestEnv

func NewTestEnv(cfg TestEnvConfig) (*TestEnv, error)

NewTestEnv creates a new test environment

func (*TestEnv) BuildServiceURL

func (e *TestEnv) BuildServiceURL() string

BuildServiceURL returns the URL of the build service

func (*TestEnv) Cleanup

func (e *TestEnv) Cleanup()

Cleanup closes the test environment

func (*TestEnv) StoreServiceURL

func (e *TestEnv) StoreServiceURL() string

StoreServiceURL returns the URL of the store service

type TestEnvConfig

type TestEnvConfig struct {
	// WorkDir is the working directory for the test environment. The object store will be placed there.
	WorkDir string
	// CatalogURL is the URL or path to the extension catalog. If empty, the default catalog will be used
	CatalogURL string
}

TestEnvConfig is the configuration for the test environment

Jump to

Keyboard shortcuts

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