Documentation ¶
Index ¶
- func CreateConnection(ctx context.Context, db *dbcontext.DB, id int) error
- func CreateRequest(ctx context.Context, db *dbcontext.DB, id string, connectionID int) error
- func DB(t *testing.T) *dbcontext.DB
- func Endpoint(t *testing.T, router *echo.Echo, tc APITestCase)
- func MockRouter(logger log.Logger) *echo.Echo
- func MockRoutingContext(req *http.Request) (echo.Context, *httptest.ResponseRecorder)
- func ResetTables(t *testing.T, db *dbcontext.DB, tables ...string)
- type APITestCase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateConnection ¶
CreateConnection creates a connection.
func CreateRequest ¶
func Endpoint ¶
func Endpoint(t *testing.T, router *echo.Echo, tc APITestCase)
Endpoint tests an HTTP endpoint using the given APITestCase spec.
func MockRouter ¶
MockRouter creates a routing.Router for testing APIs.
func MockRoutingContext ¶
func MockRoutingContext(req *http.Request) (echo.Context, *httptest.ResponseRecorder)
MockRoutingContext creates a routing.Conext for testing handlers.
Types ¶
Click to show internal directories.
Click to hide internal directories.