File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -128,10 +128,10 @@ type T struct {
128128 succeeded []* event.CommandSucceededEvent
129129 failed []* event.CommandFailedEvent
130130
131- Client * mongo.Client
132- // fpClient *mongo.Client
133- DB * mongo.Database
134- Coll * mongo.Collection
131+ Client * mongo.Client
132+ fpClient * mongo.Client
133+ DB * mongo.Database
134+ Coll * mongo.Collection
135135}
136136
137137func newT (wrapped * testing.T , opts ... * Options ) * T {
@@ -718,6 +718,7 @@ func (t *T) createTestClient() {
718718 uriOpts = options .Client ().ApplyURI (testContext .connString .Original )
719719 }
720720 }
721+
721722 var err error
722723 // Pass in uriOpts first so clientOpts wins if there are any conflicting settings.
723724 t .Client , err = mongo .NewClient (uriOpts , clientOpts )
@@ -727,6 +728,15 @@ func (t *T) createTestClient() {
727728 if err := t .Client .Connect (context .Background ()); err != nil {
728729 t .Fatalf ("error connecting client: %v" , err )
729730 }
731+
732+ clientOpts .AutoEncryptionOptions = nil
733+ t .fpClient , err = mongo .NewClient (uriOpts , clientOpts )
734+ if err != nil {
735+ t .Fatalf ("error creating client: %v" , err )
736+ }
737+ if err := t .fpClient .Connect (context .Background ()); err != nil {
738+ t .Fatalf ("error connecting client: %v" , err )
739+ }
730740}
731741
732742func (t * T ) createTestCollection () {
You can’t perform that action at this time.
0 commit comments