test_utils

package
v0.0.0-...-1f32f52 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2014 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Utility functions for testing net2/http2

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureListen

func EnsureListen(c *C, hostport string)

This checks to ensure a server is running on the specified host port. DO NOT USE IN PRODUCTION.

func RandomListenPort

func RandomListenPort(c *C) int

This returns a random port for unit testing. DO NOT USE IN PRODUCTION.

Types

type TestServer

type TestServer struct {
	*httptest.Server

	CloseChan chan bool
}

func SetupTestServer

func SetupTestServer(ssl bool) (*TestServer, string)

Create a dummy server for unittesting. DO NOT USE IN PRODUCTION.

Jump to

Keyboard shortcuts

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