e2e

package
v3.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// Directives to be used for e2e testing
	Directives = `` /* 1105-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func Run

func Run(cfg Config) error

Run executes the end-to-end tests with the given configuration. It performs health checks on the proxy and httpbin endpoints, and then runs a series of tests to validate the behavior of the Coraza WAF.

Types

type Config

type Config struct {
	// NulledBody indicates whether interruptions at response body phase are allowed to return 200 (Instead of 403), but with a body full of null bytes.
	NulledBody bool
	// ProxiedEntrypoint is the proxy endpoint used to perform requests.
	ProxiedEntrypoint string
	// HttpbinEntrypoint is the upstream httpbin endpoint, used for health checking reasons.
	HttpbinEntrypoint string
}

Config holds the configuration for running the end-to-end tests.

type StreamCheck added in v3.4.0

type StreamCheck func(resp *http.Response) error

StreamCheck is a callback used for validating responses that should be read incrementally (e.g., streaming/SSE). The callback should read from resp.Body as needed and return an error on validation failure.

Directories

Path Synopsis
cmd
httpe2e command

Jump to

Keyboard shortcuts

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