Documentation
¶
Overview ¶
objects unit tests
Index ¶
- Variables
- func HandleBulkDeleteSuccessfully(t *testing.T)
- func HandleCopyObjectSuccessfully(t *testing.T)
- func HandleCreateTextObjectSuccessfully(t *testing.T, content string)
- func HandleCreateTextWithCacheControlSuccessfully(t *testing.T, content string)
- func HandleCreateTypelessObjectSuccessfully(t *testing.T, content string)
- func HandleDeleteObjectSuccessfully(t *testing.T)
- func HandleDownloadObjectSuccessfully(t *testing.T)
- func HandleGetObjectSuccessfully(t *testing.T)
- func HandleListObjectNamesSuccessfully(t *testing.T)
- func HandleListObjectsInfoSuccessfully(t *testing.T)
- func HandleListSubdirSuccessfully(t *testing.T)
- func HandleUpdateObjectSuccessfully(t *testing.T)
Constants ¶
This section is empty.
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.
Functions ¶
func HandleBulkDeleteSuccessfully ¶ added in v0.11.0
HandleBulkDeleteSuccessfully creates an HTTP handler at `/` on the test handler mux that responds with a `BulkDelete` response.
func HandleCopyObjectSuccessfully ¶
HandleCopyObjectSuccessfully creates an HTTP handler at `/testContainer/testObject` on the test handler mux that responds with a `Copy` response.
func HandleCreateTextObjectSuccessfully ¶
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 ¶
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 ¶
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 ¶
HandleDeleteObjectSuccessfully creates an HTTP handler at `/testContainer/testObject` on the test handler mux that responds with a `Delete` response.
func HandleDownloadObjectSuccessfully ¶
HandleDownloadObjectSuccessfully creates an HTTP handler at `/testContainer/testObject` on the test handler mux that responds with a `Download` response.
func HandleGetObjectSuccessfully ¶
HandleGetObjectSuccessfully creates an HTTP handler at `/testContainer/testObject` on the test handler mux that responds with a `Get` response.
func HandleListObjectNamesSuccessfully ¶
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 ¶
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 ¶
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 ¶
HandleUpdateObjectSuccessfully creates an HTTP handler at `/testContainer/testObject` on the test handler mux that responds with a `Update` response.
Types ¶
This section is empty.