v1

package
v0.0.0-...-80377ec Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareFiles

func CompareFiles(t *testing.T, file1, file2 string) (bool, error)

CompareFiles will compare two files

func CreateContainer

func CreateContainer(t *testing.T, client *gophercloud.ServiceClient) (string, error)

CreateContainer will create a container with a random name.

func CreateRandomFile

func CreateRandomFile(t *testing.T, parentDir string) (string, error)

CreateRandomFile will create a file with random content.

func CreateTempDir

func CreateTempDir(t *testing.T, parentDir string) (string, error)

CreateTempDir will create and return a temp directory.

func CreateTempFile

func CreateTempFile(t *testing.T, dir string) (*os.File, error)

CreateTempFile will create and return a temp file.

func DeleteContainer

func DeleteContainer(t *testing.T, client *gophercloud.ServiceClient, cName string)

DeleteContainer will delete a container. A fatal error will occur if the container failed to be deleted. This works best when used as a deferred function.

func DeleteObject

func DeleteObject(t *testing.T, client *gophercloud.ServiceClient, cName, oName string)

DeleteObject will delete an object. A fatal error will occur if the object failed to be deleted. This works best when used as a deferred function.

func DeleteTempDir

func DeleteTempDir(t *testing.T, dirName string)

DeleteTempDir will delete a temporary directory. A fatal error will occur if the directory could not be deleted. This works best when used as a deferred function.

func DeleteTempFile

func DeleteTempFile(t *testing.T, fileName string)

DeleteTempFile will delete a temporary file. A fatal error will occur if the file could not be deleted. This works best when used as a deferred function.

func GetObject

func GetObject(client *gophercloud.ServiceClient, cName, oName string) (*objects.GetHeader, error)

GetObject is an alias to objects.GetObject so we don't have to import gophercloud/gophercloud into objects_test.go and make things confusing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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