Documentation
¶
Index ¶
- func AssertError(t *testing.T, err error, context string)
- func AssertNoError(t *testing.T, err error, context string)
- func AssertStringContains(t *testing.T, str, substr, context string)
- func AssertStringNotContains(t *testing.T, str, substr, context string)
- func AssertURLsInOutput(t *testing.T, output string, expectedURLs []string)
- func BuildTestBinary(t *testing.T) string
- func CreateBasicTestServer() *httptest.Server
- func CreateComplexSiteServer() *httptest.Server
- func CreateServerWithError(errorPaths []string) *httptest.Server
- func CreateSlowServer(delay time.Duration) *httptest.Server
- func GetProjectRoot() string
- func RunUrlmapCommand(binaryPath string, args ...string) (string, string, error)
- type TestEnvironment
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertError ¶
AssertError checks that an error occurred
func AssertNoError ¶
AssertNoError checks that no error occurred
func AssertStringContains ¶
AssertStringContains checks that a string contains a substring
func AssertStringNotContains ¶
AssertStringNotContains checks that a string does not contain a substring
func AssertURLsInOutput ¶
AssertURLsInOutput checks if expected URLs are present in the output
func BuildTestBinary ¶
BuildTestBinary builds the urlmap binary for testing
func CreateBasicTestServer ¶
CreateBasicTestServer creates a basic test server for testing
func CreateComplexSiteServer ¶
CreateComplexSiteServer creates a test server with a complex site structure
func CreateServerWithError ¶
CreateServerWithError creates a test server that returns errors for certain paths
func CreateSlowServer ¶
CreateSlowServer creates a test server with slow responses
func GetProjectRoot ¶
func GetProjectRoot() string
GetProjectRoot returns the project root directory
Types ¶
type TestEnvironment ¶
TestEnvironment represents a test environment setup
func SetupTestEnvironment ¶
func SetupTestEnvironment(t *testing.T) *TestEnvironment
SetupTestEnvironment creates a complete test environment
func (*TestEnvironment) Cleanup ¶
func (te *TestEnvironment) Cleanup()
Cleanup cleans up the test environment