testing

package
v0.7.16 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const CreateRequest = `` /* 232-byte string literal not displayed */
View Source
const CreateResponse = `
{
  "tasks": [
    "50f53a35-42ed-40c4-82b2-5a37fb3e00bc"
  ]
}
`
View Source
const DeleteResponse = `
{
  "tasks": [
    "50f53a35-42ed-40c4-82b2-5a37fb3e00bc"
  ]
}
`
View Source
const MetadataResponse = `
{
  "key": "some_key",
  "value": "some_val",
  "read_only": false
}
`
View Source
const MetadataResponseKV = `
{
  "some_key": "some_val"
}
`
View Source
const UpdateRequest = `` /* 151-byte string literal not displayed */
View Source
const UploadRequest = `` /* 256-byte string literal not displayed */

Variables

View Source
var (
	Image1 = images.Image{
		ID:            "4a44e5a2-e7ba-41b8-bf78-ddfa2e22974b",
		Name:          "fedora-coreos",
		Description:   "",
		Status:        "active",
		Tags:          []string{},
		Visibility:    "public",
		MinDisk:       0,
		MinRAM:        0,
		OsDistro:      "fedora-coreos",
		OsVersion:     "",
		DisplayOrder:  0,
		CreatedAt:     createdTime,
		UpdatedAt:     &updatedTime,
		Size:          1685454848,
		CreatorTaskID: nil,
		TaskID:        nil,
		DiskFormat:    "qcow2",
		Region:        "RegionOne",
		Metadata:      []metadata.Metadata{ResourceMetadataReadOnly},
	}
	ExpectedImagesSlice = []images.Image{Image1}
	Tasks1              = tasks.TaskResults{
		Tasks: []tasks.TaskID{"50f53a35-42ed-40c4-82b2-5a37fb3e00bc"},
	}

	ResourceMetadata = map[string]interface{}{
		"some_key": "some_val",
	}

	ResourceMetadataReadOnly = metadata.Metadata{
		Key:      "some_key",
		Value:    "some_val",
		ReadOnly: false,
	}

	Metadata1 = metadata.Metadata{
		Key:      "cost-center",
		Value:    "Atlanta",
		ReadOnly: false,
	}
	Metadata2 = metadata.Metadata{
		Key:      "data-center",
		Value:    "A",
		ReadOnly: false,
	}
	ExpectedMetadataList = []metadata.Metadata{Metadata1, Metadata2}
)
View Source
var GetResponse = fmt.Sprintf(`
{
  "id": "4a44e5a2-e7ba-41b8-bf78-ddfa2e22974b",
  "project_id": 1,
  "min_ram": 0,
  "region_id": 1,
  "visibility": "public",
  "os_distro": "fedora-coreos",
  "tags": [],
  "updated_at": "2020-03-09T10:16:54+0000",
  "size": 1685454848,
  "task_id": null,
  "region": "RegionOne",
  "created_at": "2020-03-09T10:16:45+0000",
  "disk_format": "qcow2",
  "min_disk": 0,
  "name": "fedora-coreos",
  "status": "active",
  "metadata_detailed": [%s],
  "metadata": %s
}
`, MetadataResponse, MetadataResponseKV)
View Source
var ListResponse = fmt.Sprintf(`
{
  "count": 1,
  "results": [
   {
      "id": "4a44e5a2-e7ba-41b8-bf78-ddfa2e22974b",
      "project_id": 1,
      "min_ram": 0,
      "region_id": 1,
      "visibility": "public",
      "os_distro": "fedora-coreos",
      "tags": [],
      "updated_at": "2020-03-09T10:16:54+0000",
      "size": 1685454848,
      "task_id": null,
      "region": "RegionOne",
      "created_at": "2020-03-09T10:16:45+0000",
      "disk_format": "qcow2",
      "min_disk": 0,
      "name": "fedora-coreos",
      "status": "active",
      "metadata_detailed": [%s],
  	  "metadata": %s
    }
  ]
}
`, MetadataResponse, MetadataResponseKV)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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