tests

package
v0.0.0-...-cf015e3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDummyProcessor

func NewDummyProcessor(ctx context.Context) *picfit.Processor

func NewImageServer

func NewImageServer() *httptest.Server

func RandString

func RandString(n int) string

func Run

func Run(t *testing.T, f FuncTest, opt ...Option)

Types

type Dimension

type Dimension struct {
	Width  int
	Height int
}

type FuncTest

type FuncTest func(t *testing.T, s *Suite)

type Option

type Option func(*Options)

func WithConfig

func WithConfig(cfg string) Option

WithConfig overrides config instance.

type Options

type Options struct {
	Config string
}

options are server options.

type Suite

type Suite struct {
	Processor *picfit.Processor
	Config    *config.Config
}

type TestRequest

type TestRequest struct {
	URL         string
	Dimensions  *Dimension
	ContentType string
}

Jump to

Keyboard shortcuts

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