helpers

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package helpers provides utilities for integration tests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLargeContent

func GetLargeContent() string

GetLargeContent returns large content for stress testing

func GetRepetitiveContent

func GetRepetitiveContent() string

GetRepetitiveContent returns content with repetition

Types

type SampleContent

type SampleContent struct {
	Name        string
	Content     string
	Description string
}

SampleContent provides test data fixtures

func GetCodeSamples

func GetCodeSamples() []SampleContent

GetCodeSamples returns sample code for testing

type TestEnvironment

type TestEnvironment struct {
	RootDir   string
	ConfigDir string
	DataDir   string
	Cleanup   func()
}

TestEnvironment provides a clean test environment

func NewTestEnvironment

func NewTestEnvironment(t *testing.T) *TestEnvironment

NewTestEnvironment creates a new test environment

func (*TestEnvironment) CreateDir

func (e *TestEnvironment) CreateDir(t *testing.T, path string) string

CreateDir creates a test directory

func (*TestEnvironment) CreateFile

func (e *TestEnvironment) CreateFile(t *testing.T, path string, content []byte) string

CreateFile creates a test file with content

func (*TestEnvironment) SetEnv

func (e *TestEnvironment) SetEnv(key, value string)

SetEnv sets environment variables for the test

Jump to

Keyboard shortcuts

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