Help us shape the future of Go! Take the 2026 Go Developer Survey

testing

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const AggregateAddHostBody = `` /* 448-byte string literal not displayed */
View Source
const AggregateCreateBody = `` /* 244-byte string literal not displayed */
View Source
const AggregateGetBody = `` /* 436-byte string literal not displayed */
View Source
const AggregateListBody = `` /* 775-byte string literal not displayed */

AggregateListBody is sample response to the List call

View Source
const AggregateRemoveHostBody = `` /* 420-byte string literal not displayed */
View Source
const AggregateSetMetadataBody = `` /* 480-byte string literal not displayed */
View Source
const AggregateUpdateBody = `` /* 420-byte string literal not displayed */

Variables

View Source
var (
	// First aggregate from the AggregateListBody
	FirstFakeAggregate = aggregates.Aggregate{
		AvailabilityZone: "",
		Hosts:            []string{},
		ID:               1,
		Metadata:         map[string]string{},
		Name:             "test-aggregate1",
		CreatedAt:        time.Date(2017, 12, 22, 10, 12, 6, 0, time.UTC),
		UpdatedAt:        time.Time{},
		DeletedAt:        time.Time{},
		Deleted:          false,
	}

	// Second aggregate from the AggregateListBody
	SecondFakeAggregate = aggregates.Aggregate{
		AvailabilityZone: "test-az",
		Hosts:            []string{"cmp0"},
		ID:               4,
		Metadata:         map[string]string{"availability_zone": "test-az"},
		Name:             "test-aggregate2",
		CreatedAt:        time.Date(2017, 12, 22, 10, 16, 7, 0, time.UTC),
		UpdatedAt:        time.Time{},
		DeletedAt:        time.Time{},
		Deleted:          false,
	}

	// Aggregate from the AggregateCreateBody
	CreatedAggregate = aggregates.Aggregate{
		AvailabilityZone: "london",
		Hosts:            nil,
		ID:               32,
		Metadata:         nil,
		Name:             "name",
		CreatedAt:        time.Date(2016, 12, 27, 22, 51, 32, 0, time.UTC),
		UpdatedAt:        time.Time{},
		DeletedAt:        time.Time{},
		Deleted:          false,
	}

	// Aggregate ID to delete
	AggregateIDtoDelete = 1

	// Aggregate ID to get, from the AggregateGetBody
	AggregateIDtoGet = SecondFakeAggregate.ID

	// Aggregate ID to update
	AggregateIDtoUpdate = FirstFakeAggregate.ID

	// Updated aggregate
	UpdatedAggregate = aggregates.Aggregate{
		AvailabilityZone: "nova2",
		Hosts:            []string{},
		ID:               1,
		Metadata:         map[string]string{"availability_zone": "nova2"},
		Name:             "test-aggregate2",
		CreatedAt:        time.Date(2017, 12, 22, 10, 12, 6, 0, time.UTC),
		UpdatedAt:        time.Date(2017, 12, 23, 10, 18, 0, 0, time.UTC),
		DeletedAt:        time.Time{},
		Deleted:          false,
	}

	AggregateWithAddedHost = aggregates.Aggregate{
		AvailabilityZone: "test-az",
		Hosts:            []string{"cmp0", "cmp1"},
		ID:               4,
		Metadata:         map[string]string{"availability_zone": "test-az"},
		Name:             "test-aggregate2",
		CreatedAt:        time.Date(2017, 12, 22, 10, 16, 7, 0, time.UTC),
		UpdatedAt:        time.Time{},
		DeletedAt:        time.Time{},
		Deleted:          false,
	}

	AggregateWithRemovedHost = aggregates.Aggregate{
		AvailabilityZone: "nova2",
		Hosts:            []string{},
		ID:               1,
		Metadata:         map[string]string{"availability_zone": "nova2"},
		Name:             "test-aggregate2",
		CreatedAt:        time.Date(2017, 12, 22, 10, 12, 6, 0, time.UTC),
		UpdatedAt:        time.Date(2017, 12, 23, 10, 18, 0, 0, time.UTC),
		DeletedAt:        time.Time{},
		Deleted:          false,
	}

	AggregateWithUpdatedMetadata = aggregates.Aggregate{
		AvailabilityZone: "test-az",
		Hosts:            []string{"cmp0"},
		ID:               4,
		Metadata:         map[string]string{"availability_zone": "test-az", "key": "value"},
		Name:             "test-aggregate2",
		CreatedAt:        time.Date(2017, 12, 22, 10, 16, 7, 0, time.UTC),
		UpdatedAt:        time.Date(2017, 12, 23, 10, 18, 0, 0, time.UTC),
		DeletedAt:        time.Time{},
		Deleted:          false,
	}
)

Functions

func HandleAddHostSuccessfully

func HandleAddHostSuccessfully(t *testing.T)

func HandleCreateSuccessfully

func HandleCreateSuccessfully(t *testing.T)

func HandleDeleteSuccessfully

func HandleDeleteSuccessfully(t *testing.T)

func HandleGetSuccessfully

func HandleGetSuccessfully(t *testing.T)

func HandleListSuccessfully

func HandleListSuccessfully(t *testing.T)

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

func HandleRemoveHostSuccessfully

func HandleRemoveHostSuccessfully(t *testing.T)

func HandleSetMetadataSuccessfully

func HandleSetMetadataSuccessfully(t *testing.T)

func HandleUpdateSuccessfully

func HandleUpdateSuccessfully(t *testing.T)

Types

This section is empty.

Jump to

Keyboard shortcuts

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