Documentation ¶
Index ¶
- func IncludeRandomRangeTests(t *testing.T, baseTest test.SugarTest, fullData []byte, contentType string) test.SugarTests
- func IncludeRangeTests(t *testing.T, baseTest test.SugarTest, byteRanges []string, fullData []byte, ...) test.SugarTests
- func MultiRangeTestTransform(t *testing.T, baseTest test.SugarTest, byteRanges []string, fullData []byte, ...) test.SugarTest
- func OnlyRandomRangeTests(t *testing.T, baseTest test.SugarTest, fullData []byte, contentType string) test.SugarTests
- func OnlyRangeTests(t *testing.T, baseTest test.SugarTest, byteRanges []string, fullData []byte, ...) test.SugarTests
- func SingleRangeTestTransform(t *testing.T, baseTest test.SugarTest, byteRange string, fullData []byte) test.SugarTest
- func StandardCARTestTransforms(t *testing.T, sts test.SugarTests) test.SugarTests
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IncludeRandomRangeTests ¶
func IncludeRandomRangeTests(t *testing.T, baseTest test.SugarTest, fullData []byte, contentType string) test.SugarTests
IncludeRandomRangeTests takes a test where there is no "Range" header set in the request, or checks on the StatusCode, Body, or Content-Range headers and verifies whether a valid response is given for the requested ranges. Will test the full request, a single range request for the first passed range as well as a multi-range request for all the requested ranges.
If contentType is empty it is ignored.
If no ranges are passed then some non-overlapping ranges are automatically generated for data >= 10 bytes. Smaller data will produce a panic to avoid undefined behavior.
Note: HTTP Range requests can be validly responded with either the full data, or the requested partial data Note: HTTP Multi Range requests can be validly responded with one of the full data, the partial data from the first range, or the partial data from all the requested ranges
func IncludeRangeTests ¶
func IncludeRangeTests(t *testing.T, baseTest test.SugarTest, byteRanges []string, fullData []byte, contentType string) test.SugarTests
IncludeRangeTests takes a test where there is no "Range" header set in the request, or checks on the StatusCode, Body, or Content-Range headers and verifies whether a valid response is given for the requested ranges. Will test the full request, a single range request for the first passed range as well as a multi-range request for all the requested ranges.
If contentType is empty it is ignored.
If no ranges are passed, then a panic is produced.
Note: HTTP Range requests can be validly responded with either the full data, or the requested partial data Note: HTTP Multi Range requests can be validly responded with one of the full data, the partial data from the first range, or the partial data from all the requested ranges
func MultiRangeTestTransform ¶
func MultiRangeTestTransform(t *testing.T, baseTest test.SugarTest, byteRanges []string, fullData []byte, contentType string) test.SugarTest
MultiRangeTestTransform takes a test where there is no "Range" header set in the request, or checks on the StatusCode, Body, or Content-Range or Content-Type headers and verifies whether a valid response is given for the requested ranges.
If contentType is empty it is ignored.
Note: HTTP Multi Range requests can be validly responded with one of the full data, the partial data from the first range, or the partial data from all the requested ranges.
func OnlyRandomRangeTests ¶
func OnlyRandomRangeTests(t *testing.T, baseTest test.SugarTest, fullData []byte, contentType string) test.SugarTests
OnlyRandomRangeTests takes a test where there is no "Range" header set in the request, or checks on the StatusCode, Body, or Content-Range headers and verifies whether a valid response is given for the requested ranges. Will test both a single range request for the first passed range as well as a multi-range request for all the requested ranges.
If contentType is empty it is ignored.
If no ranges are passed then some non-overlapping ranges are automatically generated for data >= 10 bytes. Smaller data will produce a panic to avoid undefined behavior.
Note: HTTP Range requests can be validly responded with either the full data, or the requested partial data Note: HTTP Multi Range requests can be validly responded with one of the full data, the partial data from the first range, or the partial data from all the requested ranges
func OnlyRangeTests ¶
func OnlyRangeTests(t *testing.T, baseTest test.SugarTest, byteRanges []string, fullData []byte, contentType string) test.SugarTests
OnlyRangeTests takes a test where there is no "Range" header set in the request, or checks on the StatusCode, Body, or Content-Range headers and verifies whether a valid response is given for the requested ranges. Will test both a single range request for the first passed range as well as a multi-range request for all the requested ranges.
If contentType is empty it is ignored.
If no ranges are passed, then a panic is produced.
Note: HTTP Range requests can be validly responded with either the full data, or the requested partial data Note: HTTP Multi Range requests can be validly responded with one of the full data, the partial data from the first range, or the partial data from all the requested ranges
func SingleRangeTestTransform ¶
func SingleRangeTestTransform(t *testing.T, baseTest test.SugarTest, byteRange string, fullData []byte) test.SugarTest
SingleRangeTestTransform takes a test where there is no "Range" header set in the request, or checks on the StatusCode, Body, or Content-Range headers and verifies whether a valid response is given for the requested range.
Note: HTTP Range requests can be validly responded with either the full data, or the requested partial data.
func StandardCARTestTransforms ¶
func StandardCARTestTransforms(t *testing.T, sts test.SugarTests) test.SugarTests
Types ¶
This section is empty.