test

package
v0.0.0-...-a470c86 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2021 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Endpoint

func Endpoint(t *testing.T, e *echo.Echo, tc APITestCase)

Endpoint tests an HTTP endpoint using the given AuthAPITestCase spec.

func Postgres

func Postgres() (*pgxpool.Pool, configd.Config, error)

Postgres returns the postgres instance

Types

type APITestCase

type APITestCase struct {
	Name         string
	Method       string
	URL          string
	Context      map[string]interface{}
	Body         string
	WantStatus   int
	WantResponse string
}

APITestCase represents the data needed to describe an API test case.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL