bucket: refactor policies and fix bugs related to enforcing policies. (#2766)

This patch also addresses the problem of double caching at
object layer once at XL and another at handler layer.
This commit is contained in:
Harshavardhana
2016-09-22 23:47:48 -07:00
committed by GitHub
parent aa579bbc20
commit ca5ca8332b
10 changed files with 46 additions and 148 deletions
-6
View File
@@ -30,8 +30,6 @@ func TestGetBucketLocationHandler(t *testing.T) {
}
func testGetBucketLocationHandler(obj ObjectLayer, instanceType string, t TestErrHandler) {
initBucketPolicies(obj)
// get random bucket name.
bucketName := getRandomBucketName()
// Create bucket.
@@ -130,8 +128,6 @@ func TestHeadBucketHandler(t *testing.T) {
}
func testHeadBucketHandler(obj ObjectLayer, instanceType string, t TestErrHandler) {
initBucketPolicies(obj)
// get random bucket name.
bucketName := getRandomBucketName()
// Create bucket.
@@ -207,8 +203,6 @@ func TestListMultipartUploadsHandler(t *testing.T) {
// testListMultipartUploadsHandler - Tests validate listing of multipart uploads.
func testListMultipartUploadsHandler(obj ObjectLayer, instanceType string, t TestErrHandler) {
initBucketPolicies(obj)
// get random bucket name.
bucketName := getRandomBucketName()