mirror of
https://github.com/minio/minio.git
synced 2025-11-09 21:49:46 -05:00
tests: cleaning up. (#2875)
- Clean up PutObjectPart and ListObjectPart API handler tests. - Add more comments, make the tests more readable. - Add verification for HTTP response status code. - Initialize the test using object Layer. - Move to Go 1.7 sub tests.
This commit is contained in:
committed by
Harshavardhana
parent
ed676667d0
commit
97f4989945
@@ -1428,7 +1428,7 @@ func ExecObjectLayerAPINilTest(t TestErrHandler, bucketName, objectName, instanc
|
||||
|
||||
// ExecObjectLayerAPITest - executes object layer API tests.
|
||||
// Creates single node and XL ObjectLayer instance, registers the specified API end points and runs test for both the layers.
|
||||
func ExecObjectLayerAPITest(t TestErrHandler, objAPITest objAPITestType, endPoints []string) {
|
||||
func ExecObjectLayerAPITest(t *testing.T, objAPITest objAPITestType, endPoints []string) {
|
||||
objLayer, fsDir, err := prepareFS()
|
||||
if err != nil {
|
||||
t.Fatalf("Initialization of object layer failed for single node setup: %s", err)
|
||||
@@ -1458,7 +1458,7 @@ func ExecObjectLayerAPITest(t TestErrHandler, objAPITest objAPITestType, endPoin
|
||||
|
||||
// function to be passed to ExecObjectLayerAPITest, for executing object layr API handler tests.
|
||||
type objAPITestType func(obj ObjectLayer, instanceType string, bucketName string,
|
||||
apiRouter http.Handler, credentials credential, t TestErrHandler)
|
||||
apiRouter http.Handler, credentials credential, t *testing.T)
|
||||
|
||||
// Regular object test type.
|
||||
type objTestType func(obj ObjectLayer, instanceType string, t TestErrHandler)
|
||||
|
||||
Reference in New Issue
Block a user