Documentation ¶
Overview ¶
Package testsuites contains shared test suites that should be run against every version of Relay to validate the behavior of the core code. These are run in two ways:
1. Within the Core project, by core_run_endpoints_test.go. This validates that the test suites are correct with regard to the core components alone.
2. Within the dependent Relay projects (this is why they are not implemented in _test.go files, because it's not possible to access _test code from another project). This validates that each Relay version has correctly set up its core components.
Index ¶
- func DoAllCoreEndpointTests(t *testing.T, constructor TestConstructor)
- func DoEvalEndpointsTests(t *testing.T, constructor TestConstructor)
- func DoEventProxyTests(t *testing.T, constructor TestConstructor)
- func DoJSClientCORSBehaviorTests(t *testing.T, constructor TestConstructor)
- func DoJSClientEvalRoutesTest(t *testing.T, constructor TestConstructor)
- func DoJSClientEventProxyTest(t *testing.T, constructor TestConstructor)
- func DoJSClientGoalsEndpointTest(t *testing.T, constructor TestConstructor)
- func DoJSClientStreamsTest(t *testing.T, constructor TestConstructor)
- func DoMobileEvalRoutesTest(t *testing.T, constructor TestConstructor)
- func DoMobileEventProxyTest(t *testing.T, constructor TestConstructor)
- func DoMobileStreamsTest(t *testing.T, constructor TestConstructor)
- func DoPHPPollingEndpointsTests(t *testing.T, constructor TestConstructor)
- func DoServerSideEvalRoutesTest(t *testing.T, constructor TestConstructor)
- func DoServerSideEventProxyTest(t *testing.T, constructor TestConstructor)
- func DoServerSideStreamsTest(t *testing.T, constructor TestConstructor)
- func DoStatusEndpointTests(t *testing.T, constructor TestConstructor)
- func DoStreamEndpointsTests(t *testing.T, constructor TestConstructor)
- func DoTest(t *testing.T, c config.Config, constructor TestConstructor, ...)
- type TestConstructor
- type TestParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoAllCoreEndpointTests ¶
func DoAllCoreEndpointTests(t *testing.T, constructor TestConstructor)
func DoEvalEndpointsTests ¶
func DoEvalEndpointsTests(t *testing.T, constructor TestConstructor)
func DoEventProxyTests ¶
func DoEventProxyTests(t *testing.T, constructor TestConstructor)
func DoJSClientCORSBehaviorTests ¶ added in v6.4.5
func DoJSClientCORSBehaviorTests(t *testing.T, constructor TestConstructor)
func DoJSClientEvalRoutesTest ¶
func DoJSClientEvalRoutesTest(t *testing.T, constructor TestConstructor)
func DoJSClientEventProxyTest ¶
func DoJSClientEventProxyTest(t *testing.T, constructor TestConstructor)
func DoJSClientGoalsEndpointTest ¶
func DoJSClientGoalsEndpointTest(t *testing.T, constructor TestConstructor)
func DoJSClientStreamsTest ¶
func DoJSClientStreamsTest(t *testing.T, constructor TestConstructor)
func DoMobileEvalRoutesTest ¶
func DoMobileEvalRoutesTest(t *testing.T, constructor TestConstructor)
func DoMobileEventProxyTest ¶
func DoMobileEventProxyTest(t *testing.T, constructor TestConstructor)
func DoMobileStreamsTest ¶
func DoMobileStreamsTest(t *testing.T, constructor TestConstructor)
func DoPHPPollingEndpointsTests ¶
func DoPHPPollingEndpointsTests(t *testing.T, constructor TestConstructor)
func DoServerSideEvalRoutesTest ¶
func DoServerSideEvalRoutesTest(t *testing.T, constructor TestConstructor)
func DoServerSideEventProxyTest ¶
func DoServerSideEventProxyTest(t *testing.T, constructor TestConstructor)
func DoServerSideStreamsTest ¶
func DoServerSideStreamsTest(t *testing.T, constructor TestConstructor)
func DoStatusEndpointTests ¶
func DoStatusEndpointTests(t *testing.T, constructor TestConstructor)
func DoStreamEndpointsTests ¶
func DoStreamEndpointsTests(t *testing.T, constructor TestConstructor)
func DoTest ¶
func DoTest(t *testing.T, c config.Config, constructor TestConstructor, action func(TestParams))
DoTest some code against a new Relay instance that is set up with the specified configuration.
Types ¶
type TestConstructor ¶
type TestConstructor func(config.Config, ldlog.Loggers) TestParams
TestConstructor is provided by whatever Relay variant is calling the test suite, to provide the appropriate setup and teardown for that variant.
func (TestConstructor) RunTest ¶
func (c TestConstructor) RunTest(t *testing.T, name string, testFn func(*testing.T, TestConstructor))
RunTest is a shortcut for running a subtest method with this parameter.