gophercloud: github.com/gophercloud/gophercloud/openstack/objectstorage/v1/objects/testing Index | Files

package testing

import "github.com/gophercloud/gophercloud/openstack/objectstorage/v1/objects/testing"

objects unit tests

Index

Package Files

doc.go fixtures.go

Variables

var ExpectedListInfo = []objects.Object{
    {
        Hash:         "451e372e48e0f6b1114fa0724aa79fa1",
        LastModified: time.Date(2016, time.August, 17, 22, 11, 58, 602650000, time.UTC),
        Bytes:        14,
        Name:         "goodbye",
        ContentType:  "application/octet-stream",
    },
    {
        Hash:         "451e372e48e0f6b1114fa0724aa79fa1",
        LastModified: time.Date(2016, time.August, 17, 22, 11, 58, 602650000, time.UTC),
        Bytes:        14,
        Name:         "hello",
        ContentType:  "application/octet-stream",
    },
}

ExpectedListInfo is the result expected from a call to `List` when full info is requested.

var ExpectedListNames = []string{"hello", "goodbye"}

ExpectedListNames is the result expected from a call to `List` when just object names are requested.

var ExpectedListSubdir = []objects.Object{
    {
        Subdir: "directory/",
    },
}

ExpectedListSubdir is the result expected from a call to `List` when full info is requested.

func HandleCopyObjectSuccessfully Uses

func HandleCopyObjectSuccessfully(t *testing.T)

HandleCopyObjectSuccessfully creates an HTTP handler at `/testContainer/testObject` on the test handler mux that responds with a `Copy` response.

func HandleCreateTextObjectSuccessfully Uses

func HandleCreateTextObjectSuccessfully(t *testing.T, content string)

HandleCreateTextObjectSuccessfully creates an HTTP handler at `/testContainer/testObject` on the test handler mux that responds with a `Create` response. A Content-Type of "text/plain" is expected.

func HandleCreateTextWithCacheControlSuccessfully Uses

func HandleCreateTextWithCacheControlSuccessfully(t *testing.T, content string)

HandleCreateTextWithCacheControlSuccessfully creates an HTTP handler at `/testContainer/testObject` on the test handler mux that responds with a `Create` response. A Cache-Control of `max-age="3600", public` is expected.

func HandleCreateTypelessObjectSuccessfully Uses

func HandleCreateTypelessObjectSuccessfully(t *testing.T, content string)

HandleCreateTypelessObjectSuccessfully creates an HTTP handler at `/testContainer/testObject` on the test handler mux that responds with a `Create` response. No Content-Type header may be present in the request, so that server- side content-type detection will be triggered properly.

func HandleDeleteObjectSuccessfully Uses

func HandleDeleteObjectSuccessfully(t *testing.T)

HandleDeleteObjectSuccessfully creates an HTTP handler at `/testContainer/testObject` on the test handler mux that responds with a `Delete` response.

func HandleDownloadObjectSuccessfully Uses

func HandleDownloadObjectSuccessfully(t *testing.T)

HandleDownloadObjectSuccessfully creates an HTTP handler at `/testContainer/testObject` on the test handler mux that responds with a `Download` response.

func HandleGetObjectSuccessfully Uses

func HandleGetObjectSuccessfully(t *testing.T)

HandleGetObjectSuccessfully creates an HTTP handler at `/testContainer/testObject` on the test handler mux that responds with a `Get` response.

func HandleListObjectNamesSuccessfully Uses

func HandleListObjectNamesSuccessfully(t *testing.T)

HandleListObjectNamesSuccessfully creates an HTTP handler at `/testContainer` on the test handler mux that responds with a `List` response when only object names are requested.

func HandleListObjectsInfoSuccessfully Uses

func HandleListObjectsInfoSuccessfully(t *testing.T)

HandleListObjectsInfoSuccessfully creates an HTTP handler at `/testContainer` on the test handler mux that responds with a `List` response when full info is requested.

func HandleListSubdirSuccessfully Uses

func HandleListSubdirSuccessfully(t *testing.T)

HandleListSubdirSuccessfully creates an HTTP handler at `/testContainer` on the test handler mux that responds with a `List` response when full info is requested.

func HandleUpdateObjectSuccessfully Uses

func HandleUpdateObjectSuccessfully(t *testing.T)

HandleUpdateObjectSuccessfully creates an HTTP handler at `/testContainer/testObject` on the test handler mux that responds with a `Update` response.

Package testing imports 9 packages (graph). Updated 2019-08-02. Refresh now. Tools for package owners.