diff --git a/test/e2e/util/mongotester/mongotester.go b/test/e2e/util/mongotester/mongotester.go index 45bf12c3a..409086cf7 100644 --- a/test/e2e/util/mongotester/mongotester.go +++ b/test/e2e/util/mongotester/mongotester.go @@ -547,7 +547,10 @@ func WithoutTls() OptionApplier { // WithURI will add URI connection string func WithURI(uri string) OptionApplier { var clientOptions options.ClientOptions - _ = options.Client().ApplyURI(uri).Opts[0](&clientOptions) + setterFns := options.Client().ApplyURI(uri).Opts + for _, set := range setterFns { + _ = set(&clientOptions) + } return clientOptionAdder{option: &clientOptions} }