Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServerBlockWithConfig ¶ added in v1.2.0
func ServerBlockWithConfig(cfg SubstrateConfig) string
ServerBlockWithConfig returns a server block with the specified substrate configuration.
func StandardServerBlock ¶ added in v1.2.0
func StandardServerBlock() string
StandardServerBlock returns the default server block for substrate tests. It matches *.js files and routes them through the substrate transport.
Types ¶
type E2ETestContext ¶
type E2ETestContext struct {
T *testing.T
TempDir string
Tester *caddytest.Tester
BaseURL string
HTTPPort int
ExpectedResponse string
}
func RunE2ETest ¶
func RunE2ETest(t *testing.T, serverBlockContent string, files []TestFile) *E2ETestContext
func (*E2ETestContext) AssertGet ¶
func (ctx *E2ETestContext) AssertGet(path, expectedBody string)
func (*E2ETestContext) AssertGetStatus ¶
func (ctx *E2ETestContext) AssertGetStatus(path string, expectedStatus int)
type SubstrateConfig ¶ added in v1.2.0
type SubstrateConfig struct {
IdleTimeout string // e.g., "5m", "0", "-1"
StartupTimeout string // e.g., "30s"
}
SubstrateConfig holds optional configuration for the substrate transport.
Click to show internal directories.
Click to hide internal directories.