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

Function testEncryptedSSECToSSES3CopyObject

functional_tests.go:10019–10037  ·  view source on GitHub ↗

Test encrypted copy object

()

Source from the content-addressed store, hash-verified

10017
10018// Test encrypted copy object
10019func testEncryptedSSECToSSES3CopyObject() {
10020 // initialize logging params
10021 startTime := time.Now()
10022 testName := getFuncName()
10023 function := "CopyObject(destination, source)"
10024 args := map[string]interface{}{}
10025
10026 c, err := NewClient(ClientConfig{TrailingHeaders: true})
10027 if err != nil {
10028 logError(testName, function, args, startTime, "", "MinIO v2 client object creation failed", err)
10029 return
10030 }
10031 // Generate a new random bucket name.
10032 bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test-")
10033
10034 sseSrc := encrypt.DefaultPBKDF([]byte("correct horse battery staple"), []byte(bucketName+"srcObject"))
10035 sseDst := encrypt.NewSSE()
10036 testEncryptedCopyObjectWrapper(c, bucketName, sseSrc, sseDst)
10037}
10038
10039// Test encrypted copy object
10040func testEncryptedSSECToUnencryptedCopyObject() {

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