Documentation
¶
Index ¶
- Constants
- Variables
- func ExpectDurationTracked(t *testing.T, k *kero.Kero)
- func ExpectHelloIgnored(t *testing.T, k *kero.Kero)
- func ExpectPixelToTrack(t *testing.T, k *kero.Kero)
- func ExpectRequestsTracked(t *testing.T, k *kero.Kero)
- func IgnoredHelloRequest() *http.Request
- func PixelRequest() *http.Request
- type DashboardTest
- type TrackingTest
Constants ¶
View Source
const DashPass = "pass"
View Source
const DashPath = "/_kero_test"
View Source
const DashUsername = "admin"
View Source
const HelloPath = "/hello/:id"
View Source
const PixelPath = "/px.gif"
View Source
const PrefixToIgnore = "/hello"
View Source
const WaitDuration = time.Duration(123 * time.Millisecond)
View Source
const WaitPath = "/wait"
Variables ¶
View Source
var DashboardTests = []DashboardTest{ { Description: "prevent unauthorized access", Path: DashPath, Authed: false, ExpectError: true, }, { Description: "load CSS assets", Path: DashPath + "/assets/css/app.css", Authed: true, ExpectError: false, }, { Description: "load dashboard with some content", Path: DashPath, Authed: true, ExpectError: false, }, }
View Source
var TrackingTests = []TrackingTest{ { Path: "/favicon.ico", ExpectToBeTracked: false, }, { Path: DashPath, ExpectToBeTracked: false, }, { Path: "/hello/world", ExpectToBeTracked: true, }, { Path: "/hello/earth", ExpectToBeTracked: true, }, { Path: "/hello/go", ExpectToBeTracked: true, }, { Path: "/", ExpectToBeTracked: true, }, }
View Source
var WaitRequest = httptest.NewRequest("GET", WaitPath, nil)
Functions ¶
func IgnoredHelloRequest ¶ added in v0.5.0
func PixelRequest ¶ added in v0.2.0
Types ¶
type DashboardTest ¶
func (*DashboardTest) HasFailed ¶
func (t *DashboardTest) HasFailed(statusCode int) bool
func (*DashboardTest) Request ¶
func (t *DashboardTest) Request() *http.Request
type TrackingTest ¶
func (*TrackingTest) Request ¶
func (t *TrackingTest) Request() *http.Request
Click to show internal directories.
Click to hide internal directories.