testing

package
v0.7.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const ServiceListBody = `` /* 1496-byte string literal not displayed */

ServiceListBody represents a raw service list result with Pike+ release.

View Source
const ServiceListBodyPre253 = `` /* 1348-byte string literal not displayed */

ServiceListBodyPre253 represents a raw service list from the Compute API with microversion older than 2.53.

Variables

View Source
var (
	// FirstFakeServicePre253 represents the first service from the
	// ServiceListBodyPre253.
	FirstFakeServicePre253 = services.Service{
		Binary:         "nova-scheduler",
		DisabledReason: "test1",
		Host:           "host1",
		ID:             "1",
		State:          "up",
		Status:         "disabled",
		UpdatedAt:      time.Date(2012, 10, 29, 13, 42, 2, 0, time.UTC),
		Zone:           "internal",
	}

	// SecondFakeServicePre253 represents the second service from the
	// ServiceListBodyPre253.
	SecondFakeServicePre253 = services.Service{
		Binary:         "nova-compute",
		DisabledReason: "test2",
		Host:           "host1",
		ID:             "2",
		State:          "up",
		Status:         "disabled",
		UpdatedAt:      time.Date(2012, 10, 29, 13, 42, 5, 0, time.UTC),
		Zone:           "nova",
	}

	// ThirdFakeServicePre253 represents the third service from the
	// ServiceListBodyPre253.
	ThirdFakeServicePre253 = services.Service{
		Binary:         "nova-scheduler",
		DisabledReason: "",
		Host:           "host2",
		ID:             "3",
		State:          "down",
		Status:         "enabled",
		UpdatedAt:      time.Date(2012, 9, 19, 6, 55, 34, 0, time.UTC),
		Zone:           "internal",
	}

	// FourthFakeServicePre253 represents the fourth service from the
	// ServiceListBodyPre253.
	FourthFakeServicePre253 = services.Service{
		Binary:         "nova-compute",
		DisabledReason: "test4",
		Host:           "host2",
		ID:             "4",
		State:          "down",
		Status:         "disabled",
		UpdatedAt:      time.Date(2012, 9, 18, 8, 3, 38, 0, time.UTC),
		Zone:           "nova",
	}
)
View Source
var (
	// FirstFakeService represents the first service from the ServiceListBody.
	FirstFakeService = services.Service{
		Binary:         "nova-scheduler",
		DisabledReason: "test1",
		Host:           "host1",
		ID:             "4c720fa0-02c3-4834-8279-9eecf9edb6cb",
		State:          "up",
		Status:         "disabled",
		UpdatedAt:      time.Date(2012, 10, 29, 13, 42, 2, 0, time.UTC),
		Zone:           "internal",
	}

	// SecondFakeService represents the second service from the ServiceListBody.
	SecondFakeService = services.Service{
		Binary:         "nova-compute",
		DisabledReason: "test2",
		Host:           "host1",
		ID:             "1fdfec3e-ee03-4e36-b99b-71cf2967b70c",
		State:          "up",
		Status:         "disabled",
		UpdatedAt:      time.Date(2012, 10, 29, 13, 42, 5, 0, time.UTC),
		Zone:           "nova",
	}

	// ThirdFakeService represents the third service from the ServiceListBody.
	ThirdFakeService = services.Service{
		Binary:         "nova-scheduler",
		DisabledReason: "",
		Host:           "host2",
		ID:             "bd0b2e30-809e-4160-bd3d-f23ca30e9b68",
		State:          "down",
		Status:         "enabled",
		UpdatedAt:      time.Date(2012, 9, 19, 6, 55, 34, 0, time.UTC),
		Zone:           "internal",
	}

	// FourthFakeService represents the fourth service from the ServiceListBody.
	FourthFakeService = services.Service{
		Binary:         "nova-compute",
		DisabledReason: "test4",
		Host:           "host2",
		ID:             "fe41c476-33e2-4ac3-ad21-3ffaf1b9c644",
		State:          "down",
		Status:         "disabled",
		UpdatedAt:      time.Date(2012, 9, 18, 8, 3, 38, 0, time.UTC),
		Zone:           "nova",
	}
)

Functions

func HandleListPre253Successfully

func HandleListPre253Successfully(t *testing.T)

HandleListPre253Successfully configures the test server to respond to a List request to a Compute server API pre 2.53 microversion release.

func HandleListSuccessfully

func HandleListSuccessfully(t *testing.T)

HandleListSuccessfully configures the test server to respond to a List request to a Compute server with Pike+ release.

Types

This section is empty.

Jump to

Keyboard shortcuts

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