framework

package
v0.8.12 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanString

func CleanString(input string) string

func CleanupTempDir

func CleanupTempDir(initialDir, tempDir string)

func CopyToTempDir

func CopyToTempDir(relativePath string) (string, error)

func CopyToTempDirInDir

func CopyToTempDirInDir(baseDir, relativePath string) (string, error)

func CopyToTempDirWithoutChdir

func CopyToTempDirWithoutChdir(relativePath string) (string, error)

func CreateTempDir

func CreateTempDir() (string, error)

func ExpectEqual

func ExpectEqual(actual any, extra any, explain ...any)

ExpectEqual expects the specified two are the same, otherwise an exception raises

func ExpectError

func ExpectError(err error, explain ...any)

ExpectError expects an error happens, otherwise an exception raises

func ExpectNoError

func ExpectNoError(err error, explain ...any)

ExpectNoError checks if "err" is set, and if so, fails assertion while logging the error.

func ExpectNoErrorWithOffset

func ExpectNoErrorWithOffset(offset int, err error, explain ...any)

ExpectNoErrorWithOffset checks if "err" is set, and if so, fails assertion while logging the error at "offset" levels above its caller (for example, for call chain f -> g -> ExpectNoErrorWithOffset(1, ...) error would be logged for "f").

func ExpectNotEqual

func ExpectNotEqual(actual any, extra any, explain ...any)

ExpectNotEqual expects the specified two are not the same, otherwise an exception raises

func GetTimeout

func GetTimeout() time.Duration

func ServeAgent

func ServeAgent()

ServeAgent will be a simple http file server that will expose our freshly compiled devpod binaries to be downloaded as agents. useful for non-linux runners

Types

type Framework

type Framework struct {
	DevpodBinDir  string
	DevpodBinName string
}

func NewDefaultFramework

func NewDefaultFramework(path string) *Framework

func (*Framework) DevPodBuild

func (f *Framework) DevPodBuild(ctx context.Context, additionalArgs ...string) error

func (*Framework) DevPodContextCreate

func (f *Framework) DevPodContextCreate(ctx context.Context, name string, extraArgs ...string) error

func (*Framework) DevPodContextDelete

func (f *Framework) DevPodContextDelete(ctx context.Context, name string, extraArgs ...string) error

func (*Framework) DevPodContextUse

func (f *Framework) DevPodContextUse(ctx context.Context, name string, extraArgs ...string) error

func (*Framework) DevPodIDEList added in v0.8.11

func (f *Framework) DevPodIDEList(ctx context.Context, extraArgs ...string) (string, error)

func (*Framework) DevPodIDEUse added in v0.8.11

func (f *Framework) DevPodIDEUse(ctx context.Context, ide string, extraArgs ...string) error

func (*Framework) DevPodList

func (f *Framework) DevPodList(ctx context.Context) (string, error)

DevPodList executes the `devpod list` command in the test framework

func (*Framework) DevPodListParsed

func (f *Framework) DevPodListParsed(ctx context.Context) ([]*provider2.Workspace, error)

func (*Framework) DevPodMachineCreate

func (f *Framework) DevPodMachineCreate(args []string) error

func (*Framework) DevPodMachineDelete

func (f *Framework) DevPodMachineDelete(args []string) error

func (*Framework) DevPodProviderAdd

func (f *Framework) DevPodProviderAdd(ctx context.Context, args ...string) error

func (*Framework) DevPodProviderDelete

func (f *Framework) DevPodProviderDelete(ctx context.Context, args ...string) error

func (*Framework) DevPodProviderFindOption

func (f *Framework) DevPodProviderFindOption(ctx context.Context, provider string, searchStr string, extraArgs ...string) error

func (*Framework) DevPodProviderList

func (f *Framework) DevPodProviderList(ctx context.Context, extraArgs ...string) error

func (*Framework) DevPodProviderOptionsCheckNamespaceDescription

func (f *Framework) DevPodProviderOptionsCheckNamespaceDescription(ctx context.Context, provider, searchStr string) error

func (*Framework) DevPodProviderUpdate

func (f *Framework) DevPodProviderUpdate(ctx context.Context, args ...string) error

func (*Framework) DevPodProviderUse

func (f *Framework) DevPodProviderUse(ctx context.Context, provider string, extraArgs ...string) error

func (*Framework) DevPodSSH

func (f *Framework) DevPodSSH(ctx context.Context, workspace string, command string) (string, error)

func (*Framework) DevPodSSHEchoTestString

func (f *Framework) DevPodSSHEchoTestString(ctx context.Context, workspace string) error

func (*Framework) DevPodSSHGpgTestKey

func (f *Framework) DevPodSSHGpgTestKey(ctx context.Context, workspace string) error

func (*Framework) DevPodStatus

func (f *Framework) DevPodStatus(ctx context.Context, extraArgs ...string) (client.WorkspaceStatus, error)

func (*Framework) DevPodStop

func (f *Framework) DevPodStop(ctx context.Context, workspace string) error

func (*Framework) DevPodUp

func (f *Framework) DevPodUp(ctx context.Context, additionalArgs ...string) error

func (*Framework) DevPodUpRecreate

func (f *Framework) DevPodUpRecreate(ctx context.Context, additionalArgs ...string) error

func (*Framework) DevPodUpReset

func (f *Framework) DevPodUpReset(ctx context.Context, additionalArgs ...string) error

func (*Framework) DevPodUpStreams

func (f *Framework) DevPodUpStreams(ctx context.Context, workspace string, additionalArgs ...string) (string, string, error)

func (*Framework) DevPodUpWithIDE

func (f *Framework) DevPodUpWithIDE(ctx context.Context, additionalArgs ...string) error

DevPodUp executes the `devpod up` command in the test framework

func (*Framework) DevPodWorkspaceDelete

func (f *Framework) DevPodWorkspaceDelete(ctx context.Context, workspace string, extraArgs ...string) error

func (*Framework) DevPodWorkspaceStop

func (f *Framework) DevPodWorkspaceStop(ctx context.Context, extraArgs ...string) error

func (*Framework) DevpodPortTest

func (f *Framework) DevpodPortTest(ctx context.Context, port string, workspace string) error

func (*Framework) ExecCommand

func (f *Framework) ExecCommand(ctx context.Context, captureStdOut, searchForString bool, searchString string, args []string) error

ExecCommand executes the command string with the devpod test binary

func (*Framework) ExecCommandCapture

func (f *Framework) ExecCommandCapture(ctx context.Context, args []string) (string, string, error)

ExecCommandCapture executes the command string with the devpod test binary, and returns stdout, stderr, and any error that occurred.

func (*Framework) ExecCommandOutput

func (f *Framework) ExecCommandOutput(ctx context.Context, args []string) (string, error)

ExecCommand executes the command string with the devpod test binary

func (*Framework) ExecCommandStdout

func (f *Framework) ExecCommandStdout(ctx context.Context, args []string) error

ExecCommandStdout executes the command string with the devpod test binary

func (*Framework) FindWorkspace

func (f *Framework) FindWorkspace(ctx context.Context, id string) (*provider2.Workspace, error)

func (*Framework) SetupGPG

func (f *Framework) SetupGPG(tmpDir string) error

type Pod

type Pod struct {
	Spec PodSpec `json:"spec"`
}

type PodContainer

type PodContainer struct {
	Image string `json:"image,omitempty"`
}

type PodList

type PodList struct {
	Items []Pod `json:"items"`
}

PodList is a list of Pods.

type PodSpec

type PodSpec struct {
	Containers []PodContainer `json:"containers,omitempty"`
}

Jump to

Keyboard shortcuts

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