testing

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

tenantnetworks unit tests

Index

Constants

View Source
const GetOutput = `
{
    "network": {
			"cidr": "10.0.0.10/29",
			"id": "20c8acc0-f747-4d71-a389-46d078ebf000",
			"label": "mynet_1"
		}
}
`

GetOutput is a sample response to a Get call.

View Source
const ListOutput = `` /* 319-byte string literal not displayed */

ListOutput is a sample response to a List call.

Variables

ExpectedNetworkSlice is the slice of results that should be parsed from ListOutput, in the expected order.

View Source
var FirstNetwork = tenantnetworks.Network{
	CIDR: "10.0.0.0/29",
	ID:   "20c8acc0-f747-4d71-a389-46d078ebf047",
	Name: "mynet_0",
}
View Source
var SecondNetwork = tenantnetworks.Network{
	CIDR: "10.0.0.10/29",
	ID:   "20c8acc0-f747-4d71-a389-46d078ebf000",
	Name: "mynet_1",
}

SecondNetwork is the second result in ListOutput.

Functions

func HandleGetSuccessfully

func HandleGetSuccessfully(t *testing.T)

HandleGetSuccessfully configures the test server to respond to a Get request for an existing network.

func HandleListSuccessfully

func HandleListSuccessfully(t *testing.T)

HandleListSuccessfully configures the test server to respond to a List request.

Types

This section is empty.

Jump to

Keyboard shortcuts

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