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

Function testEncryptedCopyObjectV2

functional_tests.go:10020–10038  ·  view source on GitHub ↗

Test encrypted copy object

()

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.85

Calls 5

getFuncNameFunction · 0.85
NewClientFunction · 0.85
logErrorFunction · 0.85
randStringFunction · 0.70

Tested by

no test coverage detected