MCPcopy
hub / github.com/minio/minio-go / testEncryptedSSES3ToSSECCopyObject

Function testEncryptedSSES3ToSSECCopyObject

functional_tests.go:9957–9975  ·  view source on GitHub ↗

Test encrypted copy object

()

Source from the content-addressed store, hash-verified

9955
9956// Test encrypted copy object
9957func testEncryptedSSES3ToSSECCopyObject() {
9958 // initialize logging params
9959 startTime := time.Now()
9960 testName := getFuncName()
9961 function := "CopyObject(destination, source)"
9962 args := map[string]interface{}{}
9963
9964 c, err := NewClient(ClientConfig{TrailingHeaders: true})
9965 if err != nil {
9966 logError(testName, function, args, startTime, "", "MinIO v2 client object creation failed", err)
9967 return
9968 }
9969 // Generate a new random bucket name.
9970 bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test-")
9971
9972 sseSrc := encrypt.NewSSE()
9973 sseDst := encrypt.DefaultPBKDF([]byte("correct horse battery staple"), []byte(bucketName+"dstObject"))
9974 testEncryptedCopyObjectWrapper(c, bucketName, sseSrc, sseDst)
9975}
9976
9977// Test encrypted copy object
9978func testEncryptedSSES3ToSSES3CopyObject() {

Callers 1

mainFunction · 0.85

Calls 6

NewSSEFunction · 0.92
getFuncNameFunction · 0.85
NewClientFunction · 0.85
logErrorFunction · 0.85
randStringFunction · 0.70

Tested by

no test coverage detected