testing

package
v0.0.0-...-f5426d5 Latest Latest
Warning

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

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

Documentation

Overview

attachinterfaces unit tests

Index

Constants

This section is empty.

Variables

View Source
var CreateInterfacesExpected = attachinterfaces.Interface{
	PortState: "ACTIVE",
	FixedIPs: []attachinterfaces.FixedIP{
		{
			SubnetID:  "d7906db4-a566-4546-b1f4-5c7fa70f0bf3",
			IPAddress: "10.0.0.7",
		},
	},
	PortID:  "0dde1598-b374-474e-986f-5b8dd1df1d4e",
	NetID:   "8a5fe506-7e9f-4091-899b-96336909d93c",
	MACAddr: "fa:16:3e:38:2d:80",
}

CreateInterfacesExpected represents an expected repsonse from a CreateInterface request.

View Source
var GetInterfaceExpected = attachinterfaces.Interface{
	PortState: "ACTIVE",
	FixedIPs: []attachinterfaces.FixedIP{
		{
			SubnetID:  "d7906db4-a566-4546-b1f4-5c7fa70f0bf3",
			IPAddress: "10.0.0.7",
		},
		{
			SubnetID:  "45906d64-a548-4276-h1f8-kcffa80fjbnl",
			IPAddress: "10.0.0.8",
		},
	},
	PortID:  "0dde1598-b374-474e-986f-5b8dd1df1d4e",
	NetID:   "8a5fe506-7e9f-4091-899b-96336909d93c",
	MACAddr: "fa:16:3e:38:2d:80",
}

GetInterfaceExpected represents an expected repsonse from a GetInterface request.

View Source
var ListInterfacesExpected = []attachinterfaces.Interface{
	{
		PortState: "ACTIVE",
		FixedIPs: []attachinterfaces.FixedIP{
			{
				SubnetID:  "d7906db4-a566-4546-b1f4-5c7fa70f0bf3",
				IPAddress: "10.0.0.7",
			},
			{
				SubnetID:  "45906d64-a548-4276-h1f8-kcffa80fjbnl",
				IPAddress: "10.0.0.8",
			},
		},
		PortID:  "0dde1598-b374-474e-986f-5b8dd1df1d4e",
		NetID:   "8a5fe506-7e9f-4091-899b-96336909d93c",
		MACAddr: "fa:16:3e:38:2d:80",
	},
}

ListInterfacesExpected represents an expected repsonse from a ListInterfaces request.

Functions

func HandleInterfaceCreateSuccessfully

func HandleInterfaceCreateSuccessfully(t *testing.T)

HandleInterfaceCreateSuccessfully sets up the test server to respond to a CreateInterface request.

func HandleInterfaceDeleteSuccessfully

func HandleInterfaceDeleteSuccessfully(t *testing.T)

HandleInterfaceDeleteSuccessfully sets up the test server to respond to a DeleteInterface request.

func HandleInterfaceGetSuccessfully

func HandleInterfaceGetSuccessfully(t *testing.T)

HandleInterfaceGetSuccessfully sets up the test server to respond to a GetInterface request.

func HandleInterfaceListSuccessfully

func HandleInterfaceListSuccessfully(t *testing.T)

HandleInterfaceListSuccessfully sets up the test server to respond to a ListInterfaces request.

Types

This section is empty.

Jump to

Keyboard shortcuts

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