aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api/s3api_test.go
blob: 80dced59991834750a21db8c1a4fe98153736120 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package s3api

import (
	"github.com/seaweedfs/seaweedfs/weed/s3api/s3err"
	"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(s3err.EncodeXMLResponse(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(s3err.EncodeXMLResponse(response)))

}