testservice

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2018 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package testservice defines types to help test services.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckStrings

func CheckStrings(t *testing.T, serv manager.Service)

CheckStrings checks that the strings returned by a service follow the convention.

func Expose

func Expose(ctx context.Context, t *testing.T, serv manager.Exposer, timeout time.Duration) interface{}

Expose call the run function of the service and returns the exposed object after the service is running.

func TestRun

func TestRun(ctx context.Context, t *testing.T, serv manager.Runner, timeout time.Duration)

TestRun makes sure the Run function of a service calls the running and stopping functions properly, and that it doesn't return an error.

func TestRunning

func TestRunning(ctx context.Context, t *testing.T, serv manager.Runner, timeout time.Duration, fn func())

TestRunning runs a function while the service is running.

Types

This section is empty.

Jump to

Keyboard shortcuts

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