Skip to content

Commit

Permalink
fixing TestDefaultDriver test
Browse files Browse the repository at this point in the history
  • Loading branch information
mativm02 committed Jan 29, 2024
1 parent 49a1e45 commit 57272b4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion pumps/mongo.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,8 @@ func (m *MongoPump) ensureIndexes(collectionName string) error {
}

func (m *MongoPump) connect() {
m.dbConf.MongoDriverType = getMongoDriverType(m.dbConf.MongoDriverType)

store, err := persistent.NewPersistentStorage(&persistent.ClientOpts{
ConnectionString: m.dbConf.MongoURL,
UseSSL: m.dbConf.MongoUseSSL,
Expand All @@ -362,7 +364,7 @@ func (m *MongoPump) connect() {
SSLPEMKeyfile: m.dbConf.MongoSSLPEMKeyfile,
SessionConsistency: m.dbConf.MongoSessionConsistency,
ConnectionTimeout: m.timeout,
Type: getMongoDriverType(m.dbConf.MongoDriverType),
Type: m.dbConf.MongoDriverType,
DirectConnection: m.dbConf.MongoDirectConnection,
})
if err != nil {
Expand Down
4 changes: 3 additions & 1 deletion pumps/mongo_aggregate.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ func (m *MongoAggregatePump) Init(config interface{}) error {
func (m *MongoAggregatePump) connect() {
var err error

m.dbConf.MongoDriverType = getMongoDriverType(m.dbConf.MongoDriverType)

m.store, err = persistent.NewPersistentStorage(&persistent.ClientOpts{
ConnectionString: m.dbConf.MongoURL,
UseSSL: m.dbConf.MongoUseSSL,
Expand All @@ -224,7 +226,7 @@ func (m *MongoAggregatePump) connect() {
SSLPEMKeyfile: m.dbConf.MongoSSLPEMKeyfile,
SessionConsistency: m.dbConf.MongoSessionConsistency,
ConnectionTimeout: m.timeout,
Type: getMongoDriverType(m.dbConf.MongoDriverType),
Type: m.dbConf.MongoDriverType,
DirectConnection: m.dbConf.MongoDirectConnection,
})
if err != nil {
Expand Down
4 changes: 3 additions & 1 deletion pumps/mongo_selective.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ func (m *MongoSelectivePump) Init(config interface{}) error {
func (m *MongoSelectivePump) connect() {
var err error

m.dbConf.MongoDriverType = getMongoDriverType(m.dbConf.MongoDriverType)

m.store, err = persistent.NewPersistentStorage(&persistent.ClientOpts{
ConnectionString: m.dbConf.MongoURL,
UseSSL: m.dbConf.MongoUseSSL,
Expand All @@ -122,7 +124,7 @@ func (m *MongoSelectivePump) connect() {
SSLPEMKeyfile: m.dbConf.MongoSSLPEMKeyfile,
SessionConsistency: m.dbConf.MongoSessionConsistency,
ConnectionTimeout: m.timeout,
Type: getMongoDriverType(m.dbConf.MongoDriverType),
Type: m.dbConf.MongoDriverType,
DirectConnection: m.dbConf.MongoDirectConnection,
})
if err != nil {
Expand Down

0 comments on commit 57272b4

Please sign in to comment.