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

Function testEncryptedCopyObjectV2

functional_tests.go:10124–10142  ·  view source on GitHub ↗

Test encrypted copy object

()

Source from the content-addressed store, hash-verified

10122
10123// Test encrypted copy object
10124func testEncryptedCopyObjectV2() {
10125 // initialize logging params
10126 startTime := time.Now()
10127 testName := getFuncName()
10128 function := "CopyObject(destination, source)"
10129 args := map[string]interface{}{}
10130
10131 c, err := NewClient(ClientConfig{CredsV2: true, TrailingHeaders: true})
10132 if err != nil {
10133 logError(testName, function, args, startTime, "", "MinIO v2 client object creation failed", err)
10134 return
10135 }
10136 // Generate a new random bucket name.
10137 bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test-")
10138
10139 sseSrc := encrypt.DefaultPBKDF([]byte("correct horse battery staple"), []byte(bucketName+"srcObject"))
10140 sseDst := encrypt.DefaultPBKDF([]byte("correct horse battery staple"), []byte(bucketName+"dstObject"))
10141 testEncryptedCopyObjectWrapper(c, bucketName, sseSrc, sseDst)
10142}
10143
10144func testDecryptedCopyObject() {
10145 // 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