testutil

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertAgentNotRunning

func AssertAgentNotRunning(t *testing.T, projectName string)

AssertAgentNotRunning checks if the agent is not running

func AssertAgentRunning

func AssertAgentRunning(t *testing.T, projectName string)

AssertAgentRunning checks if the agent is running

func CleanupAgentContainer

func CleanupAgentContainer(t *testing.T, projectName string)

CleanupAgentContainer removes agent container and cleanup

func CreateBranch

func CreateBranch(t *testing.T, dir, branch string)

CreateBranch creates and checks out a new git branch

func CreateCommit

func CreateCommit(t *testing.T, dir, filename, content string)

CreateCommit creates a file and commits it

func CreateTestAgentYAML

func CreateTestAgentYAML(projectName string) string

CreateTestAgentYAML creates a minimal grove.yml with agent enabled

func InitGitRepo

func InitGitRepo(t *testing.T, dir string)

InitGitRepo initializes a git repository in the given directory

func RandomString

func RandomString(length int) string

RandomString generates a random string of the specified length

func RequireDocker

func RequireDocker(t *testing.T)

RequireDocker skips the test if Docker is not available

func RunGitCommand

func RunGitCommand(t *testing.T, dir string, args ...string)

RunGitCommand runs a git command in the given directory

func SetupAgentTest

func SetupAgentTest(t *testing.T) (string, string, func())

SetupAgentTest creates a complete agent test environment

func SetupTestNetwork

func SetupTestNetwork(t *testing.T, networkName string)

SetupTestNetwork creates a temporary Docker network for a test and ensures it's cleaned up.

func WaitForAgentContainer

func WaitForAgentContainer(t *testing.T, projectName string, timeout time.Duration)

WaitForAgentContainer waits for agent container to be running using docker commands

Types

This section is empty.

Jump to

Keyboard shortcuts

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