2020-01-31 08:11:08 +00:00
|
|
|
package s3api
|
|
|
|
|
|
|
|
import (
|
2021-06-11 04:50:21 +00:00
|
|
|
"github.com/chrislusf/seaweedfs/weed/s3api/s3err"
|
2020-01-31 08:11:08 +00:00
|
|
|
"testing"
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestCopyObjectResponse(t *testing.T) {
|
|
|
|
|
|
|
|
// https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
|
|
|
|
|
|
|
response := CopyObjectResult{
|
|
|
|
ETag: "12345678",
|
|
|
|
LastModified: time.Now(),
|
|
|
|
}
|
|
|
|
|
2021-06-11 04:50:21 +00:00
|
|
|
println(string(s3err.EncodeXMLResponse(response)))
|
2020-01-31 08:11:08 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestCopyPartResponse(t *testing.T) {
|
|
|
|
|
|
|
|
// https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
|
|
|
|
|
|
|
response := CopyPartResult{
|
|
|
|
ETag: "12345678",
|
|
|
|
LastModified: time.Now(),
|
|
|
|
}
|
|
|
|
|
2021-06-11 04:50:21 +00:00
|
|
|
println(string(s3err.EncodeXMLResponse(response)))
|
2020-01-31 08:11:08 +00:00
|
|
|
|
|
|
|
}
|