aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api/s3api_test.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-01-31 00:11:08 -0800
committerChris Lu <chris.lu@gmail.com>2020-01-31 00:11:12 -0800
commita80ecbfe84486487c868c90fc28d14ab337524d3 (patch)
treefd404c9e71afe80f5d5b05773e81b2219e9885ff /weed/s3api/s3api_test.go
parent3b043ead49574ec7b9972a7d689186de17dda70f (diff)
downloadseaweedfs-a80ecbfe84486487c868c90fc28d14ab337524d3.tar.xz
seaweedfs-a80ecbfe84486487c868c90fc28d14ab337524d3.zip
s3: add s3 copy
fix https://github.com/chrislusf/seaweedfs/issues/1190
Diffstat (limited to 'weed/s3api/s3api_test.go')
-rw-r--r--weed/s3api/s3api_test.go32
1 files changed, 32 insertions, 0 deletions
diff --git a/weed/s3api/s3api_test.go b/weed/s3api/s3api_test.go
new file mode 100644
index 000000000..026766beb
--- /dev/null
+++ b/weed/s3api/s3api_test.go
@@ -0,0 +1,32 @@
+package s3api
+
+import (
+ "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(),
+ }
+
+ println(string(encodeResponse(response)))
+
+}
+
+func TestCopyPartResponse(t *testing.T) {
+
+ // https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
+
+ response := CopyPartResult{
+ ETag: "12345678",
+ LastModified: time.Now(),
+ }
+
+ println(string(encodeResponse(response)))
+
+}