testutil

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package testutil contains utility functions used by server tests against different platforms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(addr string) func() error

Get sends a GET request to the address. It returns error for any non 200 status.

func Retry

func Retry(logger Logger, f func() error) error

Retry keeps calling f with exponentially increased waiting time between tries until it no longer returns an error, or the delay passes maxBackoff.

func URLSuffix

func URLSuffix() (string, error)

URLSuffix returns a human-readable suffix.

Types

type Logger

type Logger interface {
	Logf(format string, args ...interface{})
}

Logger writes logs (normally error messages) during retries.

Jump to

Keyboard shortcuts

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