s3api_test.go 626 B

123456789101112131415161718192021222324252627282930313233
  1. package s3api
  2. import (
  3. "github.com/chrislusf/seaweedfs/weed/s3api/s3err"
  4. "testing"
  5. "time"
  6. )
  7. func TestCopyObjectResponse(t *testing.T) {
  8. // https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
  9. response := CopyObjectResult{
  10. ETag: "12345678",
  11. LastModified: time.Now(),
  12. }
  13. println(string(s3err.EncodeXMLResponse(response)))
  14. }
  15. func TestCopyPartResponse(t *testing.T) {
  16. // https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
  17. response := CopyPartResult{
  18. ETag: "12345678",
  19. LastModified: time.Now(),
  20. }
  21. println(string(s3err.EncodeXMLResponse(response)))
  22. }