testenv

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package testenv contains helpers for setting up job-manager test environments.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackendTest

func BackendTest(cfg BackendTestConfig) func(t *testing.T)

func NewTestClient

func NewTestClient(t testing.TB, srv *httptest.Server) *client.Client

func NewTestControllerServer

func NewTestControllerServer(t testing.TB, cfg middleware.Config, be backend.Interface) *httptest.Server

func ReadFile

func ReadFile(t testing.TB, p string) []byte

Types

type BackendTestConfig

type BackendTestConfig struct {
	Type    string
	Backend backend.Interface

	// Fail fails instead of skipping tests when dependency check (ping) fails.
	Fail bool
}

Jump to

Keyboard shortcuts

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