diff options
author | Valeri Karpov <valeri.karpov@10gen.com> | 2014-10-10 10:59:08 -0400 |
---|---|---|
committer | Valeri Karpov <valeri.karpov@10gen.com> | 2014-10-16 12:21:00 -0400 |
commit | 5f07383be0813b0ca8d1a76a3b180d04b5cc639e (patch) | |
tree | 8875f149416df376bb985e0f73b5d904d72cd1b5 /mongodump | |
parent | 1044a517c5518c42a7ab8f025c4cc06babcf578b (diff) | |
download | mongo-5f07383be0813b0ca8d1a76a3b180d04b5cc639e.tar.gz |
TOOLS-278 make mongodump tests configurable for SSL on or SSL off based on ssltest build tag
Former-commit-id: f1f3ba8451951549f91596f5594364282bfd593c
Diffstat (limited to 'mongodump')
-rw-r--r-- | mongodump/mongodump_test.go | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/mongodump/mongodump_test.go b/mongodump/mongodump_test.go index be71ff807cc..f15531a3ea4 100644 --- a/mongodump/mongodump_test.go +++ b/mongodump/mongodump_test.go @@ -6,12 +6,9 @@ import ( "github.com/mongodb/mongo-tools/common/bsonutil" "github.com/mongodb/mongo-tools/common/db" "github.com/mongodb/mongo-tools/common/log" - commonOpts "github.com/mongodb/mongo-tools/common/options" "github.com/mongodb/mongo-tools/common/testutil" "github.com/mongodb/mongo-tools/common/util" - "github.com/mongodb/mongo-tools/mongodump/options" . "github.com/smartystreets/goconvey/convey" - "gopkg.in/mgo.v2" "gopkg.in/mgo.v2/bson" "io/ioutil" "os" @@ -32,54 +29,6 @@ var ( testPort = "27017" ) -func simpleMongoDumpInstance() *MongoDump { - ssl := &commonOpts.SSL{ - UseSSL: false, - } - namespace := &commonOpts.Namespace{ - DB: testDB, - } - connection := &commonOpts.Connection{ - Host: testServer, - Port: testPort, - } - toolOptions := &commonOpts.ToolOptions{ - SSL: ssl, - Namespace: namespace, - Connection: connection, - Auth: &commonOpts.Auth{}, - Verbosity: &commonOpts.Verbosity{}, - } - outputOptions := &options.OutputOptions{} - inputOptions := &options.InputOptions{} - - log.SetVerbosity(toolOptions.Verbosity) - - return &MongoDump{ - ToolOptions: toolOptions, - InputOptions: inputOptions, - OutputOptions: outputOptions, - } -} - -func getBareSession() (*mgo.Session, error) { - sessionProvider, err := db.InitSessionProvider(commonOpts.ToolOptions{ - Connection: &commonOpts.Connection{ - Host: testServer, - Port: testPort, - }, - Auth: &commonOpts.Auth{}, - }) - if err != nil { - return nil, err - } - session, err := sessionProvider.GetSession() - if err != nil { - return nil, err - } - return session, nil -} - // returns the number of .bson files in a directory // excluding system.indexes.bson func countNonIndexBSONFiles(dir string) (int, error) { |