Documentation
¶
Index ¶
- func AssertContains(path, substr string) error
- func AssertEmpty(path string) error
- func AssertExists(path string) error
- func AssertNotContains(path, substr string) error
- func AssertNotEmpty(path string) error
- func AssertNotExists(path string) error
- func CleanPath(path string) (string, error)
- func CopyFile(src, dst string) error
- func CreateDir(path string) error
- func CreateProjectStructure(root string) error
- func CreateServiceFiles(root string, serviceName string) error
- func EnsureDir(path string) error
- func Exists(path string) bool
- func IsDir(path string) bool
- func IsFile(path string) bool
- func ListDirs(dir string) ([]string, error)
- func ListFiles(dir string) ([]string, error)
- func ReadString(path string) (string, error)
- func RemoveIfExists(path string) error
- func WriteBasicGroveConfig(dir string) error
- func WriteFile(path string, content []byte) error
- func WriteGlobalGroveConfig(homeDir string, searchPaths map[string]config.SearchPathConfig) error
- func WriteGroveConfig(dir string, cfg *config.Config) error
- func WriteString(path string, content string) error
- type TempDirManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertContains ¶
AssertContains asserts that a file contains the specified substring.
func AssertEmpty ¶
AssertEmpty asserts that a file is empty or contains only whitespace.
func AssertExists ¶
AssertExists asserts that a file or directory exists at the given path.
func AssertNotContains ¶
AssertNotContains asserts that a file does not contain the specified substring.
func AssertNotEmpty ¶
AssertNotEmpty asserts that a file is not empty.
func AssertNotExists ¶
AssertNotExists asserts that a file or directory does not exist at the given path.
func CreateProjectStructure ¶
CreateProjectStructure creates a basic project structure for testing
func CreateServiceFiles ¶
CreateServiceFiles creates files for a test service
func ReadString ¶
ReadString reads a file and returns its content as a string
func RemoveIfExists ¶
RemoveIfExists removes a file or directory if it exists
func WriteBasicGroveConfig ¶
WriteBasicGroveConfig writes a minimal, valid grove.yml for testing a project.
func WriteGlobalGroveConfig ¶
func WriteGlobalGroveConfig(homeDir string, searchPaths map[string]config.SearchPathConfig) error
WriteGlobalGroveConfig writes a global grove.yml with search paths into a sandboxed home directory. This is useful for testing workspace discovery scenarios.
func WriteGroveConfig ¶
WriteGroveConfig writes a grove.yml file to the specified directory
func WriteString ¶
WriteString writes a string to a file
Types ¶
type TempDirManager ¶
type TempDirManager struct {
// contains filtered or unexported fields
}
TempDirManager manages temporary directories for tests
func NewTempDirManager ¶
func NewTempDirManager(prefix string) (*TempDirManager, error)
NewTempDirManager creates a new temporary directory manager
func NewTempDirManagerForExisting ¶
func NewTempDirManagerForExisting(path string) (*TempDirManager, error)
NewTempDirManagerForExisting creates a new TempDirManager for a path that already exists. The manager will not delete this path on Cleanup since it was created by an external process (the orchestrator).
func (*TempDirManager) BaseDir ¶
func (m *TempDirManager) BaseDir() string
BaseDir returns the root temporary directory
func (*TempDirManager) Cleanup ¶
func (m *TempDirManager) Cleanup() error
Cleanup removes all created directories