tests: Implemented more tests for fs-v1*.go (#2686)

This commit is contained in:
Anis Elleuch
2016-09-16 21:06:49 +01:00
committed by Harshavardhana
parent 7d37dea449
commit b89a1cd482
10 changed files with 803 additions and 24 deletions

View File

@@ -30,6 +30,7 @@ import (
"net/http/httptest"
"net/url"
"os"
"reflect"
"regexp"
"sort"
"strconv"
@@ -127,6 +128,11 @@ func nextSuffix() string {
return strconv.Itoa(int(1e9 + r%1e9))[1:]
}
// isSameType - compares two object types via reflect.TypeOf
func isSameType(obj1, obj2 interface{}) bool {
return reflect.TypeOf(obj1) == reflect.TypeOf(obj2)
}
// TestServer encapsulates an instantiation of a Minio instance with a temporary backend.
// Example usage:
// s := StartTestServer(t,"XL")