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

testing

package
v0.0.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const CreateOutput = `{
    "job_id": "ff8080826576401e01657b99fc444986"
}`

CreateOutput represents the response body from a Create request.

View Source
const FullListOutput = `` /* 1109-byte string literal not displayed */

FullListOutput represents the response body from a List request.

View Source
const RestoreOutput = `` /* 188-byte string literal not displayed */

RestoreOutput represents the response body from a Create request.

Variables

View Source
var CreateExpected = &backups.JobResponse{
	JobID: "ff8080826576401e01657b99fc444986",
}

CreateExpected represents the expected object from a Create request.

View Source
var ListExpected = []backups.Backup{
	{
		Name:             "c2c-test-buckup",
		Id:               "87566ed6-72cb-4053-aa6e-6f6216b3d507",
		Status:           "available",
		ObjectCount:      0,
		TenantId:         "17fbda95add24720a4038ba4b1c705ed",
		Container:        "a704c75f-f0d1-4efa-9fd6-7557fe1ee8d3",
		AvailabilityZone: "eu-de-01",
		DependentBackups: false,
		SnapshotId:       "a704c75f-f0d1-4efa-9fd6-7557fe1ee8d3",
		VolumeId:         "5024a06e-6990-4f12-9dcc-8fe26b01a710",
		Incremental:      false,
		Size:             10,
		Links: []golangsdk.Link{
			{
				Href: "https://vbs.eu-de.otc.t-systems.com/v2/17fbda95add24720a4038ba4b1c705ed/backups/87566ed6-72cb-4053-aa6e-6f6216b3d507",
				Rel:  "self",
			},
			{
				Href: "https://vbs.eu-de.otc.t-systems.com/17fbda95add24720a4038ba4b1c705ed/backups/87566ed6-72cb-4053-aa6e-6f6216b3d507",
				Rel:  "bookmark",
			},
		},
	},
}

ListExpected represents the expected object from a List request.

View Source
var RestoreExpected = &backups.BackupRestoreInfo{
	BackupId:   "87566ed6-72cb-4053-aa6e-6f6216b3d507",
	VolumeName: "c2c-test-disk",
	VolumeId:   "5024a06e-6990-4f12-9dcc-8fe26b01a710",
}

CreateExpected represents the expected object from a Create request.

Functions

func HandleCreateSuccessfully

func HandleCreateSuccessfully(t *testing.T, output string)

HandleCreateSuccessfully creates an HTTP handler at `/backups` on the test handler mux that responds with a `Create` response.

func HandleDeleteSuccessfully

func HandleDeleteSuccessfully(t *testing.T)

HandleDeleteSuccessfully creates an HTTP handler at `/backups/87566ed6-72cb-4053-aa6e-6f6216b3d507` on the test handler mux that responds with a `Delete` response.

func HandleGetSuccessfully

func HandleGetSuccessfully(t *testing.T)

HandleGetSuccessfully creates an HTTP handler at `/17fbda95add24720a4038ba4b1c705ed/backups/87566ed6-72cb-4053-aa6e-6f6216b3d507` on the test handler mux that responds with a `Get` response.

func HandleListSuccessfully

func HandleListSuccessfully(t *testing.T, output string)

HandleListSuccessfully creates an HTTP handler at `/backups/detail` on the test handler mux that responds with a `List` response.

func HandleRestoreSuccessfully

func HandleRestoreSuccessfully(t *testing.T, output string)

HandleRestoreSuccessfully creates an HTTP handler at `/backups/87566ed6-72cb-4053-aa6e-6f6216b3d507/restore` on the test handler mux that responds with a `Create` response.

Types

This section is empty.

Jump to

Keyboard shortcuts

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