testing

package
v1.0.20 Latest Latest
Warning

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

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

Documentation

Overview

floatingips unit tests

Index

Constants

View Source
const CreateOutput = `` /* 157-byte string literal not displayed */

CreateOutput is a sample response to a Post call

View Source
const CreateOutputWithNumericID = `` /* 155-byte string literal not displayed */

CreateOutputWithNumericID is a sample response to a Post call with a legacy nova-network-based numeric ID.

View Source
const GetOutput = `` /* 203-byte string literal not displayed */

GetOutput is a sample response to a Get call.

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

ListOutput is a sample response to a List call.

Variables

View Source
var CreatedFloatingIP = floatingips.FloatingIP{
	ID:   "1",
	IP:   "10.10.10.1",
	Pool: "nova",
}

CreatedFloatingIP is the parsed result from CreateOutput.

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

View Source
var FirstFloatingIP = floatingips.FloatingIP{
	ID:   "1",
	IP:   "10.10.10.1",
	Pool: "nova",
}

FirstFloatingIP is the first result in ListOutput.

View Source
var SecondFloatingIP = floatingips.FloatingIP{
	FixedIP:    "166.78.185.201",
	ID:         "2",
	InstanceID: "4d8c3732-a248-40ed-bebc-539a6ffd25c0",
	IP:         "10.10.10.2",
	Pool:       "nova",
}

SecondFloatingIP is the first result in ListOutput.

Functions

func HandleAssociateFixedSuccessfully

func HandleAssociateFixedSuccessfully(t *testing.T)

HandleFixedAssociateSucessfully configures the test server to respond to a Post request to associate an allocated floating IP with a specific fixed IP address

func HandleAssociateSuccessfully

func HandleAssociateSuccessfully(t *testing.T)

HandleAssociateSuccessfully configures the test server to respond to a Post request to associate an allocated floating IP

func HandleCreateSuccessfully

func HandleCreateSuccessfully(t *testing.T)

HandleCreateSuccessfully configures the test server to respond to a Create request for a new floating ip

func HandleCreateWithNumericIDSuccessfully

func HandleCreateWithNumericIDSuccessfully(t *testing.T)

HandleCreateWithNumericIDSuccessfully configures the test server to respond to a Create request for a new floating ip

func HandleDeleteSuccessfully

func HandleDeleteSuccessfully(t *testing.T)

HandleDeleteSuccessfully configures the test server to respond to a Delete request for a an existing floating ip

func HandleDisassociateSuccessfully

func HandleDisassociateSuccessfully(t *testing.T)

HandleDisassociateSuccessfully configures the test server to respond to a Post request to disassociate an allocated floating IP

func HandleGetSuccessfully

func HandleGetSuccessfully(t *testing.T)

HandleGetSuccessfully configures the test server to respond to a Get request for an existing floating ip

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