Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
qingyang-hu committed Nov 30, 2023
1 parent 4beefe6 commit d29ee0a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions mongo/integration/client_side_encryption_prose_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
package integration

import (
"bytes"
"context"
"crypto/tls"
"encoding/base64"
Expand All @@ -24,6 +25,7 @@ import (
"time"

"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/bsonrw"
"go.mongodb.org/mongo-driver/bson/bsontype"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/event"
Expand Down Expand Up @@ -2147,12 +2149,14 @@ func TestClientSideEncryptionProse(t *testing.T) {
})

mt.RunOpts("18. Azure IMDS Credentials", noClientOpts, func(mt *mtest.T) {
buf := make([]byte, 0, 256)
buf := new(bytes.Buffer)
kmsProvidersMap := map[string]map[string]interface{}{
"azure": {},
}
p, err := bson.MarshalAppend(buf[:0], kmsProvidersMap)
assert.Nil(mt, err, "error in MarshalAppendWithRegistry: %v", err)
vw, err := bsonrw.NewBSONValueWriter(buf)
assert.Nil(mt, err, "error in NewBSONValueWriter: %v", err)
err = bson.NewEncoder(vw).Encode(kmsProvidersMap)
assert.Nil(mt, err, "error in Encode: %v", err)

getClient := func(header http.Header) *http.Client {
lt := &localTransport{
Expand Down

0 comments on commit d29ee0a

Please sign in to comment.