{Bucket:"testbucket",Key:"user/user1/filename/${filename}/myfile.txt",XAmzMetaUUID:"14365123651274",SuccessActionStatus:"201",XAmzCredential:"KVGKMDUQ23TCZXTLTHLP/20160727/us-east-1/s3/aws4_request",XAmzDate:"20160727T000000Z",XAmzAlgorithm:"AWS4-HMAC-SHA256",ContentType:"image/jpeg",Expired:true,expectedErr:fmt.Errorf("Invalid according to Policy: Policy expired")},
// Different AMZ date
{Bucket:"testbucket",Key:"user/user1/filename/${filename}/myfile.txt",XAmzMetaUUID:"14365123651274",XAmzDate:"2017T000000Z",XAmzAlgorithm:"AWS4-HMAC-SHA256",ContentType:"image/jpeg",expectedErr:fmt.Errorf("Invalid according to Policy: Policy Condition failed")},
// Key which doesn't start with user/user1/filename
{Bucket:"testbucket",Key:"myfile.txt",XAmzDate:"20160727T000000Z",XAmzMetaUUID:"14365123651274",XAmzAlgorithm:"AWS4-HMAC-SHA256",ContentType:"image/jpeg",expectedErr:fmt.Errorf("Invalid according to Policy: Policy Condition failed")},
// Incorrect bucket name.
{Bucket:"incorrect",Key:"user/user1/filename/myfile.txt",XAmzMetaUUID:"14365123651274",XAmzDate:"20160727T000000Z",XAmzAlgorithm:"AWS4-HMAC-SHA256",ContentType:"image/jpeg",expectedErr:fmt.Errorf("Invalid according to Policy: Policy Condition failed")},
// Incorrect key name
{Bucket:"testbucket",Key:"incorrect",XAmzDate:"20160727T000000Z",XAmzMetaUUID:"14365123651274",XAmzAlgorithm:"AWS4-HMAC-SHA256",ContentType:"image/jpeg",expectedErr:fmt.Errorf("Invalid according to Policy: Policy Condition failed")},
// Incorrect date
{Bucket:"testbucket",Key:"user/user1/filename/${filename}/myfile.txt",XAmzMetaUUID:"14365123651274",XAmzDate:"incorrect",XAmzAlgorithm:"AWS4-HMAC-SHA256",ContentType:"image/jpeg",expectedErr:fmt.Errorf("Invalid according to Policy: Policy Condition failed")},
// Incorrect ContentType
{Bucket:"testbucket",Key:"user/user1/filename/${filename}/myfile.txt",XAmzMetaUUID:"14365123651274",XAmzDate:"20160727T000000Z",XAmzAlgorithm:"AWS4-HMAC-SHA256",ContentType:"incorrect",expectedErr:fmt.Errorf("Invalid according to Policy: Policy Condition failed")},
// Incorrect Metadata
{Bucket:"testbucket",Key:"user/user1/filename/${filename}/myfile.txt",XAmzMetaUUID:"151274",SuccessActionStatus:"201",XAmzCredential:"KVGKMDUQ23TCZXTLTHLP/20160727/us-east-1/s3/aws4_request",XAmzDate:"20160727T000000Z",XAmzAlgorithm:"AWS4-HMAC-SHA256",ContentType:"image/jpeg",expectedErr:fmt.Errorf("Invalid according to Policy: Policy Condition failed: [eq, $x-amz-meta-uuid, 14365123651274]")},