Skip to content

Commit 1fd1333

Browse files
committed
updates
1 parent be655d5 commit 1fd1333

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

mongo/integration/mtest/mongotest.go

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff 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

137137
func 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

732742
func (t *T) createTestCollection() {

0 commit comments

Comments
 (0)