tests: Fix hasExtendedHeader tests with env variable.

This commit is contained in:
Harshavardhana
2016-08-15 16:09:08 -07:00
parent bb8a425d49
commit 3d1bb8f439
2 changed files with 12 additions and 6 deletions
+9 -6
View File
@@ -16,7 +16,10 @@
package main
import "testing"
import (
"os"
"testing"
)
// Tests scenarios which can occur for hasExtendedHeader function.
func TestHasExtendedHeader(t *testing.T) {
@@ -30,26 +33,26 @@ func TestHasExtendedHeader(t *testing.T) {
metadata: map[string]string{
"X-Amz-Meta-1": "value",
},
has: true,
has: true || os.Getenv("MINIO_ENABLE_FSMETA") == "1",
},
// Verifies if X-Minio-Meta is present.
{
metadata: map[string]string{
"X-Minio-Meta-1": "value",
},
has: true,
has: true || os.Getenv("MINIO_ENABLE_FSMETA") == "1",
},
// Verifies if extended header is not present.
{
metadata: map[string]string{
"md5Sum": "value",
},
has: false,
has: false || os.Getenv("MINIO_ENABLE_FSMETA") == "1",
},
// Verifieis if extended header is not present, but with an empty input.
// Verifies if extended header is not present, but with an empty input.
{
metadata: nil,
has: false,
has: false || os.Getenv("MINIO_ENABLE_FSMETA") == "1",
},
}