testing

package
v0.0.0-...-424b5b7 Latest Latest
Warning

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

Go to latest
Published: May 7, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package testing provides testing utilities and helpers for the bootstrap-cli, including test environment setup, temporary file and directory management, and environment variable handling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestEnv

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

TestEnv represents a test environment

func NewTestEnv

func NewTestEnv(t *testing.T, homeDir string) *TestEnv

NewTestEnv creates a new test environment

func (*TestEnv) Cleanup

func (e *TestEnv) Cleanup()

Cleanup restores the original environment

func (*TestEnv) CreateTempDir

func (e *TestEnv) CreateTempDir(name string) string

CreateTempDir creates a temporary directory in the test environment

func (*TestEnv) CreateTempFile

func (e *TestEnv) CreateTempFile(name string, content []byte) string

CreateTempFile creates a temporary file in the test environment

Jump to

Keyboard shortcuts

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