Documentation
¶
Overview ¶
Package testutil provides shared test utilities for bluesnake tests. This includes HTTP test servers and common test data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ServerIndexResponse = []byte("hello world\n") CallbackTestHTML = []byte(` <!DOCTYPE html> <html> <head> <title>Callback Test Page</title> </head> <body> <div id="firstElem">First</div> <div id="secondElem">Second</div> <div id="thirdElem">Third</div> </body> </html> `) RobotsFile = ` User-agent: * Allow: /allowed Disallow: /disallowed Disallow: /allowed*q= ` )
Test data shared across tests
Functions ¶
func NewTestServer ¶
NewTestServer creates and starts a new HTTP test server
func NewUnstartedTestServer ¶
NewUnstartedTestServer creates an unstarted HTTP test server with all endpoints configured
func RequireSessionCookieAuthPage ¶
RequireSessionCookieAuthPage is middleware that requires a session cookie, redirecting through an auth page to set it if not present
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.