Documentation
¶
Index ¶
- Constants
- func AssertFirstResultFilled(t *testing.T, results any)
- func AssertSequentialRanks(t *testing.T, results any)
- func IntegrationHeadful() bool
- func IntegrationStrict() bool
- func RequireEnv(t *testing.T, key string) string
- func RequireIntegration(t *testing.T)
- func ResponseFromBytes(data []byte) *http.Response
- func ResponseFromFixture(t *testing.T, file string) *http.Response
- func ResponseFromString(html string) *http.Response
Constants ¶
View Source
const IntegrationEnv = "OPENSERP_INTEGRATION_TESTS"
View Source
const IntegrationHeadfulEnv = "OPENSERP_INTEGRATION_HEADFUL"
View Source
const IntegrationStrictEnv = "OPENSERP_INTEGRATION_STRICT"
Variables ¶
This section is empty.
Functions ¶
func AssertFirstResultFilled ¶ added in v0.7.2
AssertFirstResultFilled checks that the first result has non-empty URL, Title, and Description. Accepts any slice of structs with those string fields (avoids core import cycle).
func AssertSequentialRanks ¶ added in v0.7.2
AssertSequentialRanks verifies that result ranks start at 1 and increase by 1. Accepts any slice of structs with an int Rank field (avoids core import cycle).
func IntegrationHeadful ¶ added in v0.7.2
func IntegrationHeadful() bool
func IntegrationStrict ¶ added in v0.7.2
func IntegrationStrict() bool
func RequireIntegration ¶
func ResponseFromBytes ¶ added in v0.7.2
ResponseFromBytes wraps raw bytes in an *http.Response with status 200.
func ResponseFromFixture ¶ added in v0.7.2
ResponseFromFixture reads an HTML file from the package's testdata/ directory and returns it wrapped in an *http.Response suitable for parser functions.
func ResponseFromString ¶ added in v0.7.2
ResponseFromString wraps a raw HTML string in an *http.Response.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.